Messages in this thread | | | Date | Sun, 9 Mar 2014 08:57:19 -0700 | Subject | Re: [PATCH v4] mm: per-thread vma caching | From | Linus Torvalds <> |
| |
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
| |