[16.0] Fix MMIO overhead calculation for unreserved adapters#5418
Merged
Conversation
rene
approved these changes
Nov 20, 2025
Member
Author
|
/rerun red |
The mmioVMMOverhead() function was checking if adapters were already reserved (UsedByUUID == domainUUID) before calculating memory overhead. This check failed when the function was called from zedmanager before adapter reservation, causing "IoBundle not ours" errors and preventing accurate memory overhead estimation. The function's purpose is to estimate memory overhead for requested adapters to help decide if domain activation is possible. This is a calculation-only operation that happens before actual adapter reservation in reserveAdapters(). This commit removes the UsedByUUID check, allowing the function to: - Calculate overhead based on the requested adapter list (domainAdapterList) - Work correctly when called before reservation (from zedmanager) - Work correctly when called after reservation (from domainmgr) - Process all matching adapters returned by LookupIoBundleAny() The actual validation of adapter availability remains in reserveAdapters(), maintaining proper separation of concerns between memory estimation and resource allocation. Updated log messages to clarify this is memory overhead estimation only, not adapter reservation. Signed-off-by: Nikolay Martyanov <[email protected]> (cherry picked from commit 9116741)
cf16363 to
d19b1a9
Compare
Member
Author
|
Rebased |
Member
Author
|
/rerun red |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #5413
PR dependencies
None.
How to test and validate this PR
Run an application with at least one direct-attach adapter and check the device logs. It should not contain any log line with
estimatedVMMOverhead() failed.Changelog notes
Fixed an issue where applications with directly attached adapters could be started even when the EVE system did not have enough memory to safely run the application. Previously, the memory overhead was not properly calculated for such an application, leading to underestimated memory requirements and potential out-of-memory (OOM) or similar failures at runtime.
With this fix, EVE now correctly prevents starting an application if there is insufficient memory, taking into account the overhead for direct-attached devices.
In rare cases, if an application was already running with underestimated memory (and by chance did not fail due to OOM), this fix may now prevent such an application from starting. In this case, if a user still wishes to run the application with the previous (unsafe) memory estimation (NOT RECOMMENDED), they can manually set the memory estimation using the VMM overhead setting. If they choose to do this, they should consult the developers for recommended values to avoid undefined behaviour.
Checklist
check them.