Re: BUG: using smp_processor_id() in preemptible [00000000] code: icedove-bin/5449

From: Peter Zijlstra
Date: Tue May 25 2010 - 17:35:55 EST


On Tue, 2010-05-25 at 11:07 -0700, Divyesh Shah wrote:
> Peter, this only affects some stats collection and no scheduling
> behavior should be affected by this. Besides this call at rq_init() to
> sched_clock() there are other calls in the request dispatch and the
> request completion path. Not sure if those are problematic too.
>
> @Ingo, about your concern of time going backwards. This could happen
> with sched_clock() as well when successive measurements were made on
> different cpus which are slightly out of sync. This case is handled
> well in all places where this was used.

You really shouldn't be using sched_clock(), that thing can exhibit
unbounded drift between cpus.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/