Re: [Fwd: sched_clock() has poor resolution]

From: Dominik Brodowski
Date: Thu Sep 22 2005 - 16:00:14 EST


Hi,

On Thu, Sep 22, 2005 at 09:28:49AM +0200, Pierre Ossman wrote:
> * Let sched_clock() follow the time source. Don't have it coupled to
> the TSC.
>
> * Init the TSC even though it isn't used for anything but sched_clock().

As pmtmr requires somewhat working TSCs, you can even use TSC if pmtmr is
used as a time source:

static int init_pmtmr(char* override)
...
/* we use the TSC for delay_pmtmr, so make sure it exists */
if (!cpu_has_tsc)
return -ENODEV;
...

So at least for this case, sched_clock() can and should use TSC, not
jiffies, AFAICS.

Thanks,
Dominik
-
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/