On Mon, 12 Oct 1998, Glynn Clements wrote:
>> > If you change the value of HZ, bad things may happen.
>>
>> If bad things will happen you' ll found a bug in the kernel.
>
>That depends upon what you change it to, I guess. I wouldn't expect to
>be able to set HZ to 1E9 and still have a functioning system.
This is true but you can' t generalize that changing HZ must not be done.
>> Sure a too high value could stall the machine (bad thing ;-) and a too low
>> one could decrease too much the scheduling frequency causing some strange
>> (not bad) things.
>
>Would this include flip buffers overflowing? (I thought that was
>sync'd to HZ).
What is "flip buffers overflowing". Could you point me out the code are
you referring?
>> Something like:
>>
>> timeout = rdtsc() + 2000cycles;
>> while (rdtsc() < timout);
>>
>> This would delay exactly 2000 cycles. This way you can get the precision
>> of the frequency of the CPU.
>
>Yeah, but the poster wanted to delay for 125ms. Doing this (regularly)
>using a busy wait sounds like it would starve user-space processes of
>CPU time (or am I overlooking something?)
No you' re right. I just specifyed it myself. I only want to show to the
guy all possibilites.
Andrea Arcangeli