Re: [PATCH v10 12/41] KVM: guest_memfd: Call arch make_shared callback for to-shared conversion
Sean Christopherson <[email protected]>
| Newsgroups | org.kernel.vger.linux-trace-kernel,dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Aug 13, 2026, Ackerley Tng wrote: > Sean Christopherson <[email protected]> writes: > > 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.