Re: [PATCH] pmac_cpufreq msleep cleanup/fixes

Paul Mackerras
2004-10-23T01:24:25Z

Nishanth Aravamudan writes:

> Looks good to me... And makes quite a bit of sense, after I thought
> about it. Does feel a little hacky, but I don't see a slicker way around
> the problem...

We would need a platform-specific function to tell us how long until
the next jiffy to do any better, I think, and even then it would only
make much of a difference if HZ was significantly smaller than 1000.

We could do the how-long-until-next-jiffy function quite easily and
quickly on ppc and ppc64, just by reading the decrementer register and
scaling it. I don't know about other architectures. But if we are
mostly using HZ=1000 there doesn't seem to be much point.

Paul.