lkml.org 
[lkml]   [2014]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4] mm: per-thread vma caching
From
On Sun, Mar 9, 2014 at 5:57 AM, Oleg Nesterov <oleg@redhat.com> wrote:
>
> No, dup_task_struct() is obviously lockless. And the new child is not yet
> visible to for_each_process_thread().

Ok, then the siimple approach is to just do

/* Did we miss an invalidate event? *
if (mm->seqcount < tsk->seqcount)
clear_vma_cache();

after making the new thread visible.

Then the "race" becomes one of "we cannot have 4 billion mmap/munmap
events in other threads while we're setting up a new thread", which I
think is fine.

Linus


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