lkml.org 
[lkml]   [2004]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: anon-vma (and now filebacked-mappings too) mprotect vma merging [Re: 2.6.5-rc2-aa vma merging]
Andrea Arcangeli <andrea@suse.de> wrote:
>
> BTW, now that the lookup on the
> prio-tree is immediate the i_shared_sem has no reason anymore to be a
> semaphore either, it should go back to a spinlock like in 2.4, like the
> anon_vma is also protected by a spinlock.

That change was made for scheduling latency reasons, mainly due to huge
pagetable walks in zap_page_range():

i_shared_lock is held for a very long time during vmtruncate() and
causes high scheduling latencies when truncating a file which is
mmapped. I've seen 100 milliseconds.

So turn it into a semaphore. It nests inside mmap_sem. This
change is also needed by the shared pagetable patch, which needs to
unshare pte's on the vmtruncate path - lots of pagetable pages need to
be allocated and they are using __GFP_WAIT.

If we no longer hold that lock during pte takedown then sure, it would
be better if we had a spinlock in there.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.032 / U:0.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site