Thank you, but how much does it slow down my machine
by setting HZ to 1000? I mean slowing down the machine 
does not sound good at all.
My problem is that I'm dealing with a token bus protocol
where the token_holding_time is 1 jiffies, and each time
a host sends out a data packet I want it to check how much time 
is left of the token_holding_time. If it's only 10% or something 
then it sends the token with the data packet and then I don't
have to send the token in a separate packet when the timer goes
off. 
At this time I send the token in a separate packet, and I use
this protocol between two Linux machines, and I've got a 10-20%
improvment in transfer rate compared with the original Ethernet driver.
(I'm doing all the changes in the driver). But this is only 
between two machines alone on a network. 
So what I need is something like:
if (time_now - time_when_packet_arrived > 0.9*token_holding_time)
        send_token_with_datapacket();
But token_holding_time is 1 jiffies.

On Mon, 23 Aug 1999, Philippe Biondi wrote:

> Well, I see two solution (but I'm not a kernel guru, so....)
> -first, you can recompile your kernel with the HZ constant adjusted to 1000 
> instead of 100 in the scheduler source. But:
> * It will slows down your machine
> * Your prog will work only with your brand new kernel
> -second: you can use the udelay() function:
> (I think the parameter is in microseconds)
> so, to trigger an action in 375 ms, you put a timer for jiffies+37,
> which wait 5000 useconds (udelay(5000);) and then you can go
> better solutions?
> 
> Phil
> 
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> 

Svend!

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to