[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180426152053.GC4082@hirez.programming.kicks-ass.net>
Date: Thu, 26 Apr 2018 17:20:53 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: Andrea Parri <andrea.parri@...rulasolutions.com>,
akpm@...ux-foundation.org, oleg@...hat.com,
viro@...iv.linux.org.uk, mingo@...nel.org,
paulmck@...ux.vnet.ibm.com, keescook@...omium.org, riel@...hat.com,
mhocko@...e.com, tglx@...utronix.de,
kirill.shutemov@...ux.intel.com, marcos.souza.org@...il.com,
hoeun.ryu@...il.com, pasha.tatashin@...cle.com, gs051095@...il.com,
ebiederm@...ssion.com, dhowells@...hat.com,
rppt@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
Alan Stern <stern@...land.harvard.edu>,
Will Deacon <will.deacon@....com>,
Boqun Feng <boqun.feng@...il.com>
Subject: Re: [PATCH 4/4] exit: Lockless iteration over task list in
mm_update_next_owner()
On Thu, Apr 26, 2018 at 04:52:39PM +0300, Kirill Tkhai wrote:
> >>
> >> 1)for_each_process(g) copy_process()
> >> p->mm = mm
> >> smp_rmb(); smp_wmb() implied by alloc_pid()
> >> if (g->flags & PF_KTHREAD) list_add_tail_rcu(&p->tasks, &init_task.tasks)
> >>
> >> 2)for_each_thread(g, c) copy_process()
> >> p->mm = mm
> >> smp_rmb(); smp_wmb() implied by alloc_pid()
> >> tmp = READ_ONCE(c->mm) list_add_tail_rcu(&p->thread_node, ...)
For these two; what's the purpose of the smp_rmb()? which loads are
ordered?
Powered by blists - more mailing lists