Re: [PATCH v3 2/5] KVM: pfncache: Implement range-based invalidation check for hva_to_pfn_retry()
From: David Woodhouse
Date: Tue Aug 04 2026 - 04:26:17 EST
Resurrecting this 2024 thread in the context of
https://lore.kernel.org/all/992c01aa0167a95181bc59401a3cd991906e9d60.camel@xxxxxxxxxxxxx/
On Tue, 2024-10-15 at 17:04 -0700, Sean Christopherson wrote:
> Note, the attached patches include the "wait" idea, but I'm not convinced that's
> actually a good idea. I'll respond more to your last patch.
Yeah, I don't like the "wait" part... but I don't like it spinning
there either.
The end condition in either case is not just a single GPC being
invalidated, but a full global drain of mn_active_invalidate_count —
which is basically unbounded in the hypothetical worst case.
I very much prefer the model I had before, with a "needs_invalidation"
flag on the GPC, set *before* it actually becomes valid, and if the
refresh completes and finds "needs_invalidation" already cleared, the
refresh goes around one more time.
I'll rework the series I'd built yesterday in
https://git.infradead.org/?p=users/dwmw2/linux.git;a=shortlog;h=refs/heads/pfncache-fixes
Attachment:
smime.p7s
Description: S/MIME cryptographic signature