> 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/