lkml.org 
[lkml]   [2014]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] mm: per-thread vma caching
looks like I removed lkml somehow, resend...

On 03/08, Linus Torvalds wrote:
>
> On Sat, Mar 8, 2014 at 10:40 AM, Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > It seems this should be moved into copy_mm(), CLONE_VM needs to invalidate
> > ->vmacache too.
>
> No it doesn't. CLONE_VM doesn't change any of the vma lists,

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.

> so
> there's no reason to invalidate anything.
>
> > dup_task_struct() also copies vmacache_seqnum/vmacache, but the new thread
> > is not yet visible to vmacache_flush_all().
>
> So either the new task struct will share the mm, in which case the
> cache entries are fine

Not if they should be flushed by vmacache_flush_all() above.

Oleg.



\
 
 \ /
  Last update: 2014-03-08 21:41    [W:0.132 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site