lkml.org 
[lkml]   [2014]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] mm: per-thread vma caching
From
Date
On Sat, 2014-03-08 at 12:02 -0800, Linus Torvalds wrote:
> On Sat, Mar 8, 2014 at 11:44 AM, Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > Sure. But another thread or CLONE_VM task can do vmacache_invalidate(),
> > hit vmacache_seqnum == 0 and call vmacache_flush_all() to solve the
> > problem with potential overflow.
>
> How?
>
> Any invalidation is supposed to hold the mm semaphore for writing. And
> we should have it for reading.

Yes, invalidations are always with the write lock held. In any case it's
a good candidate to use verify_mm_writelocked(), even if it's only under
debug environments.



\
 
 \ /
  Last update: 2014-03-09 05:01    [W:0.159 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site