[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200703113603.GL117543@hirez.programming.kicks-ass.net>
Date: Fri, 3 Jul 2020 13:36:03 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Valentin Schneider <valentin.schneider@....com>
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
vincent.guittot@...aro.org, mgorman@...e.de,
Oleg Nesterov <oleg@...hat.com>, david@...morbit.com
Subject: Re: [RFC][PATCH] sched: Better document ttwu()
On Fri, Jul 03, 2020 at 10:30:12AM +0200, Peter Zijlstra wrote:
> On Thu, Jul 02, 2020 at 07:39:16PM +0100, Valentin Schneider wrote:
> > > @@ -3134,8 +3274,12 @@ static inline void prepare_task(struct task_struct *next)
> > > /*
> > > * Claim the task as running, we do this before switching to it
> > > * such that any running task will have this set.
> > > + *
> > > + * __schedule()'s rq->lock and smp_mb__after_spin_lock() orders this
> > > + * store against prior state change of @next, also see
> > > + * try_to_wake_up(), specifically smp_load_acquire(&p->on_cpu).
> >
> > smp_*cond*_load_acquire(&p->on_cpu, <blah>)
>
> Both, but yeah.. arguably the cond one is the more important one.
Ah no, this one really want to match the WF_ON_CPU case. I'll clarify
non-the-less.
Powered by blists - more mailing lists