Messages in this thread | | | Date | Sat, 8 Mar 2014 20:57:05 +0100 | From | Oleg Nesterov <> | Subject | Re: [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.
| |