[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJhGHyDa+-ehMOeLGhZ9-y-ubB4fSXG83hBGUWMRmBOtJ-wSLg@mail.gmail.com>
Date: Tue, 13 Aug 2024 14:35:54 +0800
From: Lai Jiangshan <jiangshanlai@...il.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Oliver Upton <oliver.upton@...ux.dev>, Marc Zyngier <maz@...nel.org>, Peter Xu <peterx@...hat.com>,
James Houghton <jthoughton@...gle.com>
Subject: Re: [PATCH 19/22] KVM: x86/mmu: Add infrastructure to allow walking
rmaps outside of mmu_lock
On Mon, Aug 12, 2024 at 11:22 PM Sean Christopherson <seanjc@...gle.com> wrote:
>
> Oh yeah, duh, re-read after PAUSE, not before.
>
> Definitely holler if you have any alternative ideas for walking rmaps
> without taking mmu_lock, I guarantee you've spent more time than me
> thinking about the shadow MMU :-)
We use the same bit and the same way for the rmap lock.
We just use bit_spin_lock() and the optimization for empty rmap_head is
handled out of kvm_rmap_lock().
bit_spin_lock() has the most-needed preempt_disable(). I'm not sure if the
new kvm_rmap_age_gfn_range_lockless() is called in a preempt disabled region.
Thanks
Lai
Powered by blists - more mailing lists