Re: [PATCH v5 4/7] KVM: x86/mmu: Only grab RCU lock for nx hugepage recovery for TDP MMU

From: James Houghton
Date: Mon Jul 28 2025 - 13:52:08 EST


On Wed, Jul 23, 2025 at 1:38 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Mon, Jul 07, 2025, James Houghton wrote:
> > Now that we have separate paths for the TDP MMU, it is trivial to only
> > grab rcu_read_lock() for the TDP MMU case.
>
> Yeah, but it's also a largely pointless change. For the overwhelming majority of
> deployments, rcu_read_{un}lock() does literally nothing. And when it does do
> something, the cost is a single atomic.
>
> I'm leaning quite strongly toward skipping this patch, as I find the code to be
> much more readable if KVM grabs RCU unconditionally.

That's fine with me, thanks Sean.