Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265553
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4] sched: fix incorrect wait time and wait count statistics |
| Date | 2015-11-09 11:40 +0100 |
| Message-ID | <qsS1I-5cB-15@gated-at.bofh.it> (permalink) |
| References | <qooYi-54u-21@gated-at.bofh.it> <qoqQq-6jx-1@gated-at.bofh.it> <qrPID-5cI-25@gated-at.bofh.it> <qs1JL-4zz-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v4] sched: fix incorrect wait time and wait count statistics Peter Zijlstra <peterz@infradead.org> - 2015-11-06 15:00 +0100
Re: [PATCH v4] sched: fix incorrect wait time and wait count statistics Joonwoo Park <joonwoop@codeaurora.org> - 2015-11-07 03:50 +0100
Re: [PATCH v4] sched: fix incorrect wait time and wait count statistics Peter Zijlstra <peterz@infradead.org> - 2015-11-09 11:40 +0100
Re: [PATCH v5] sched: fix incorrect wait time and wait count statistics Joonwoo Park <joonwoop@codeaurora.org> - 2015-11-13 04:40 +0100
csiph-web