Re: Can't sleep less than 20 ms

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Thu, 8 Jul 1999 22:22:37 +0200 (MEST)


Pavel Machek wrote:
> Hi!
>
> > I already have a solution for this, I'll have one thread sleep for
> > exact 10ms and then post an event, another thread will do the
> > processing (I'm writing a RTP library, I have to send/recieve RTP
> > packets in the right interval) then wait for the event. In this
> > way, the processing thread will wake up at the moment of
> > (10ms - the time used to do processing).
> >
> > Increasing HZ maybe another solution. but I don't the performance
> > implication.
>
> Alphas are already runing with HZ=1000 and unless you are running on
> 386/25, there's no noticeable performance implication...

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.

I've entered a project into cosource, which suggests to do this. So if
you want short-sleeps done right, you can go over there when it goes
open for the public (*), and put some dollars on it. Someone is bound
to want to go grab the few hundred dollars when the total comes to
that amount. I'd consider it "work" if I'd get about a thousand
dollars, but I expect that many others will beat that price.

Roger.

(*) "July, really!".

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------

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