[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <148790040.241085.1425670784201.JavaMail.zimbra@efficios.com>
Date: Fri, 6 Mar 2015 19:39:44 +0000 (UTC)
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Huang Ying <ying.huang@...el.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Lai Jiangshan <eag0628@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: Possible lock-less list race in scheduler_ipi()
----- Original Message -----
> From: "Steven Rostedt" <rostedt@...dmis.org>
> To: "Mathieu Desnoyers" <mathieu.desnoyers@...icios.com>
> Cc: "Linus Torvalds" <torvalds@...ux-foundation.org>, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>, "Huang Ying"
> <ying.huang@...el.com>, "Lai Jiangshan" <laijs@...fujitsu.com>, "Lai Jiangshan" <eag0628@...il.com>, "Peter
> Zijlstra" <peterz@...radead.org>, "LKML" <linux-kernel@...r.kernel.org>, "Ingo Molnar" <mingo@...nel.org>
> Sent: Friday, March 6, 2015 2:03:47 PM
> Subject: Re: Possible lock-less list race in scheduler_ipi()
>
> On Fri, 6 Mar 2015 14:35:23 +0000 (UTC)
> Mathieu Desnoyers <mathieu.desnoyers@...icios.com> wrote:
>
>
> > Indeed, the compiler should never reorder loads/stores from/to
> > same memory location from a program order POV. What I had in mind
> > is a bit more far-fetched though: it would involve having the compiler
> > reorder this load after a store to another memory location, which
> > would in turn allow another execution context (interrupt or thread)
> > to corrupt the list.
>
> You mean on another CPU? Because the code you are worried about has
> interrupts disabled.
I'm worried that another CPU could issue try_to_wake_up() on a
task concurrently with the llist iteration within sched_ttwu_pending().
AFAIU, ttwu_queue_remote() is called from ttwu_queue() without holding
the rq lock. So I'm wondering what prevents corruption of the wake_list
in this situation.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists