Re: Can't sleep less than 20 ms

Benno Senoner (benno@gardena.net)
Sat, 10 Jul 1999 16:46:26 +0200


--------------2A6A10018873B8F1C417258D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

> > Rogier Wolff wrote:
> > > IA32 should also use HZ=1000. However, the API (now cast in stone)
> > > specifies that HZ == 100 when seen from userland. Linus has suggested
> > > that the kernel-HZ need not be the same as what is "published" to the
> > > user applications.
> >
> > HZ == 1000 looks like yet another arbitrary decision. Why is 1000Hz
> > good enough yet 100Hz is not?
> >
> >
>
> yup. Another arbitrary number (the rate of HZ on Alpha, btw).
>
> In the Alpha case, we did some experiments at the time we went to the
> new architecture to see how much overhead running at a higher rate would
> cost; we made sure it was less than 1% on the slowest Alpha that would
> ever exist.... Along comes Linux years later, and there have been some
> schedular related performance problems recently uncovered as a result
> due to the simplicity (stupidity?) of the Linux scheduler, but I've seen
> no reason to regret this so far (the Linux schedular problems are generic:
> they just show up 10 times as often at 1000hz).
>
> Arguing that the interrupt load at 1000hz is significant on today's
> processor is specious.
>

Fully agree today 1ms seens to be a pretty long time for the CPU's point
of view.
A 400Mhz CPU executes at least 400 million instructions per second ,
this means 400.000 per ms,
I remember the Z80 which was able to execute 400.000 instructions per
second (at about 4Mhz)and the timer interrupt occurred
about 60 times/sec , so the CPU was only able 6666 instruction per
timer interrupt.
This let me suppose, that 1000HZ on modern CPUs adds very little
overhead.
The benefit is a smoother behavior of the entire system, especially when
more CPU-bound tasks are running.

regards,
Benno.

--
Benno Senoner                        E-Mail: sbenno@gardena.net
Linux scheduling latency benchmarks
http://www.gardena.net/benno/linux/audio

--------------2A6A10018873B8F1C417258D Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

      > Rogier Wolff wrote:
      > > IA32 should also use HZ=1000. However, the API (now cast in stone)
      > > specifies that HZ == 100 when seen from userland. Linus has suggested
      > > that the kernel-HZ need not be the same as what is "published" to the
      > > user applications.
      > 
      > HZ == 1000 looks like yet another arbitrary decision.  Why is 1000Hz
      > good enough yet 100Hz is not?
      > 
      >

      yup.  Another arbitrary number (the rate of HZ on Alpha, btw).

      In the Alpha case, we did some experiments at the time we went to the 
      new architecture to see how much overhead running at a higher rate would 
      cost; we made sure it was less than 1% on the slowest Alpha that would 
      ever exist....  Along comes Linux years later, and there have been some 
      schedular related performance problems recently uncovered as a result 
      due to the simplicity (stupidity?) of the Linux scheduler, but I've seen
      no reason to regret this so far (the Linux schedular problems are generic:
      they just show up 10 times as often at 1000hz).

      Arguing that the interrupt load at 1000hz is significant on today's
      processor is specious.


Fully agree today 1ms seens to be a pretty long time for the CPU's point of view.
A 400Mhz CPU executes at least 400 million instructions per second , this means 400.000 per ms,
I remember the Z80 which was able to execute 400.000 instructions per second (at about 4Mhz)and the timer interrupt occurred
about 60 times/sec , so the CPU was  only able 6666 instruction per timer interrupt.
This let me suppose, that 1000HZ on modern CPUs adds very little overhead.
The benefit is a smoother behavior of the entire system, especially when more CPU-bound tasks are running.

regards,
Benno.

-- 
Benno Senoner                        E-Mail: sbenno@gardena.net
Linux scheduling latency benchmarks
http://www.gardena.net/benno/linux/audio
  --------------2A6A10018873B8F1C417258D-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/