CA-414626: initialize cpumon even if lowmem initialization failed #429
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.
Low memory monitoring and CPU usage monitoring are used for different purposes: if we fail to initialize one, we should still try to initialize the other.
Low memory monitoring is used to reduce queue depth / buffers allocated when we have a lot of disks attached on the same host.
CPU usage monitoring is used to determine when it is safe to enter busy polling mode: when Dom0 is already under high load then we don't enter busy polling mode to allow other processes to use the CPU. If CPU usage monitoring is not initialized then tapdisk never enter polling mode, which reduces guest I/O performance.
Low memory monitoring currently fails to initialize with a newer kernel CA-400404, which exposed this latent performance bug in tapdisk. We should fix lowmem mode, but for now fix the performance bug.
After this change tapdisk now correctly enters polling mode. There is a separate bug that it won't stay in polling mode long enough, but that'll be fixed in a separate PR.