[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151109103225.GI17308@twins.programming.kicks-ass.net>
Date: Mon, 9 Nov 2015 11:32:25 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Joonwoo Park <joonwoop@...eaurora.org>
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, ohaugan@...eaurora.org
Subject: Re: [PATCH v4] sched: fix incorrect wait time and wait count
statistics
On Fri, Nov 06, 2015 at 06:41:43PM -0800, Joonwoo Park wrote:
> On Fri, Nov 06, 2015 at 02:57:49PM +0100, Peter Zijlstra wrote:
> > On Tue, Oct 27, 2015 at 09:46:53PM -0700, Joonwoo Park wrote:
> > > @@ -1272,6 +1272,15 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
> > > WARN_ON_ONCE(p->state != TASK_RUNNING && p->state != TASK_WAKING &&
> > > !p->on_rq);
> > >
> > > + /*
> > > + * Migrating fair class task must have p->on_rq = TASK_ON_RQ_MIGRATING,
> > > + * because schedstat_wait_{start,end} rebase migrating task's wait_start
> > > + * time relying on p->on_rq.
> > > + */
> > > + WARN_ON_ONCE(p->state == TASK_RUNNING &&
> > > + p->sched_class == &fair_sched_class &&
> > > + (p->on_rq && !task_on_rq_migrating(p)));
> > > +
> >
> > Why do we have to test p->on_rq? Would not ->state == RUNNING imply
> > that?
> >
>
> sched_fork() sets p->state = RUNNING before changing task cpu.
> Please let me know if you got better idea.
Ah, indeed. OK.
--
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