lkml.org 
[lkml]   [2021]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 15/24] kvm: mmu: Wrap mmu_lock cond_resched and needbreak
Date
On 21/01/21 01:19, Sean Christopherson wrote:
> What if we simply make the common mmu_lock a union? The rwlock_t is
> probably a bit bigger, but that's a few bytes for an entire VM. And
> maybe this would entice/inspire other architectures to move to a similar
> MMU model.

Looking more at this, there is a problem in that MMU notifier functions
take the MMU lock.

Yes, qrwlock the size is a bit larger than qspinlock. However, the fast
path of qrwlocks is small, and if the slow paths are tiny compared to
the mmu_lock critical sections that are so big as to require
cond_resched. So I would consider just changing all architectures to an
rwlock.

Paolo

\
 
 \ /
  Last update: 2021-01-26 15:42    [W:0.103 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site