lkml.org 
[lkml]   [2008]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mmu notifiers #v7
On Thu, 28 Feb 2008, Andrea Arcangeli wrote:

> > This is not going to work even if the mutex would work as easily as you
> > think since the patch here still does an rcu_lock/unlock around a callback.
>
> See underlined.

Mutex is not acceptable for performance reasons. I think we can just drop
the RCU lock if we simply unregister the mmu notifier in release and
forbid the drivers from removing themselves from the notification
chain. They can simply do nothing until release. At that time there is no
concurrency and thus its safe to remove even without rcu locking.

> Good point, it has to be called earlier for GRU, but it's not a
> performance issue. GRU doesn't pin the pages so it should make the
> global invalidate in ->release _before_ unmap_vmas. Linux can't fault
> in the ptes anymore because mm_users is zero so there's no need of a
> ->release_begin/end, the _begin is enough.

I do not follow you about the _begin without end but the following fix
seems okay.


\
 
 \ /
  Last update: 2008-02-28 23:03    [W:0.134 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site