Re: [PATCH v11 4/6] x86/sev: Add support to perform RMP optimizations asynchronously

Borislav Petkov <[email protected]>
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <20260805004913.GBanKIiW-O3pDjIqjH@fat_crate.local>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.