Thread (107 messages) flat view 107 messages, 10 authors, 14h ago

Re: [PATCH v10 12/41] KVM: guest_memfd: Call arch make_shared callback for to-shared conversion

From: Sean Christopherson <seanjc@google.com>
Date: 2026-08-14 15:05:00
Also in: kvm, linux-coco, linux-doc, linux-kselftest, linux-mm, lkml

On Thu, Aug 13, 2026, Ackerley Tng wrote:
Sean Christopherson [off-list ref] writes:
quoted
That's why I think it's worth analyzing the cost: if it's in the
noise, leave it alone.  If it's meaningful, figure out a not-too-gross way to skip
the entire thing if kvm_arch_gmem_make_shared() is a glorified nop in the end.
Is noise defined relative to the entire conversion process? Would this
benchmark look like

1. Convert 4G to shared on TDX with CONFIG_AMD_SEV defined
2. Convert 4G to shared on TDX without CONFIG_AMD_SEV defined

and then compare the difference in time taken?
That'd work, though I was envisioning something even simpler: use rdtsc() to
count the cycles it takes to iterate over various ranges of memory.  Do whatever
is easiest for you though.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help