Messages in this thread | | | Date | Wed, 01 May 2013 14:55:33 -0400 | From | KOSAKI Motohiro <> | Subject | Re: [PATCH 09/10] sched: task_sched_runtime introduce micro optimization |
| |
> Stronger: > > +#ifdef CONFIG_64BIT > + if (!p->on_cpu) > + return p->se.sum_exec_runtime; > +#endif > > [ Or !p->on_cpu || !add_delta ]. > > We can take the racy read versus p->on_cpu since: > If we race with it leaving cpu: we take lock, we're correct > If we race with it entering cpu: unaccounted time ---> 0, this is > indistinguishable from the read occurring a few cycles earlier.
OK, agreed. That's nice.
| |