Re: [PATCH] PPC32: Fix cpu voltage change delay

From: Benjamin Herrenschmidt
Date: Fri Oct 22 2004 - 17:43:14 EST


On Sat, 2004-10-23 at 04:01, Nishanth Aravamudan wrote:

> While looking through the latest bk changelogs, I noticed that you had
> submitted this patch using msleep(). When I read the comment, though,
> that you were offsetting the 1 millisecond with a jiffy, I was slightly
> confused as msleep() is designed to sleep for *at least* the time
> requested. So if you just use msleep(1) in these cases, you should have
> the desired effect. msleep() is designed to be independent of HZ (as the
> timeout is specified in non-jiffy units). Not using the
> jiffies_to_msecs() macro would remove some extra instructions... The
> attached patch makes this change (on top of your patch currently in bk7)
> and also changes the other schedule_timeout()s (at least, those that can
> be) to msleep.

No, please leave them as-is at least for now... Last we saw, there was
a potential issue with schedule_timeout(1) itself not guaranteeing it would
sleep for an entire jiffie, but only up to the next jiffie...

Ben.


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