Re: [PATCH v11 4/6] x86/sev: Add support to perform RMP optimizations asynchronously
From: Borislav Petkov
Date: Tue Aug 04 2026 - 20:52:57 EST
On Mon, Aug 03, 2026 at 05:22:17PM -0500, Kalra, Ashish wrote:
> Periodic re-optimization was already considered in an earlier RMPOPT series
Link?
> and dropped because of being too disruptive — a timer-based scan would run
> on all cores every time it fires, even when no memory has been freed.
What if it ran very seldomly, say once an hour?
> Running it at guest teardown (batched by the timeout) is a better fit:
> teardown is when large contiguous regions actually go back to the
> hypervisor, so the scan only runs when there's real work to do instead of on
> a fixed timer. The case of a guest freeing a 1 GB region mid-life is then
> handled by the 1 GB-hugetlb page-cleanup follow-on, not by a periodic scan.
Are you saying a periodic scan won't handle anything?
Because if it catches something, it will handle that something.
> I will also like to avoid looping on this — periodic vs teardown was already
> worked through in an earlier revision, and this is where we landed. Happy to
> revisit if there's a specific new concern, but otherwise I'd prefer to keep
> the current approach.
Sorry, this is not how upstream review works.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette