lkml.org 
[lkml]   [2007]   [Mar]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch] sched: accurate user accounting
FromMike Galbraith <>
DateMon, 26 Mar 2007 07:27:30 +0200
On Mon, 2007-03-26 at 08:11 +0300, Al Boldi wrote:

> > +       /* Sanity check. It should never go backwards or ruin accounting
> > */ +       if (unlikely(now < p->last_ran))
> > +               goto out_set;
> 
> If sched_clock() goes backwards, why not fix it, instead of hacking around 
> it?

When tasks change cpu, timestamp correction is attempted, but isn't
perfect (perfection: submit patch to read remote clock - people likely
toast poor submitter's buns very thoroughly).  Timewarps happen, and
even on Intel processors there seems to be very small difference in TSCs
in the same package.  (that's what instrumentation here said must be
true, possible booboos aside)

	-Mike

-
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/

\
 
 \ /
  Last update: 2007-03-26 07:31    [from the cache]
©2003-2008