Re: [LARTC] HTB not that exact

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 07, 2001 at 06:57:39PM +0200, Sami Farin wrote:
> Ahu wrote:
> > Both I think. There are some indications that raising HZ may not work, as it
> > may not raise the resolution of the timers in the Linux Kernel - I am
> > investigating this! So try keeping HZ stable, and raising the size of your
> > bucket.
> 
> would it  make any difference if you do...

Ok - I've since investigated this. Shapers use timers internally to block
themselves for set periods of time. These timers appear to have HZ
resolution, but a comment in the very good Linux Device Drivers book
                    http://www.xml.com/ldd/chapter/book/
appeared to indicate that raising HZ would not raise their resolution.

I contacted Jonathan Corbet, one of the authors, and he checked and found
that the book was incorrect: raising HZ *does* increase timer resolution. 

> -#define PSCHED_CLOCK_SOURCE    PSCHED_JIFFIES
> +#define PSCHED_CLOCK_SOURCE    PSCHED_CPU
> 
> I didn't see PSCHED_CLOCK_SOURCE in the 2.4routing docs...
> Can you tell more about PSCHED_CLOCK_SOURCE ?

As far as I can see, this only increases the *resolution*, not *precision*.
In other words, you can't specify shorter delays this way but you can
measure a delay that already happened far more precisely.

For example, if you decide to delay for 1 jiffy, 10ms, you may in fact have
waited 14ms. PSCHED_JIFFIES will not see this - 1.4==1 jiffy has passed.
PSCHED_CPU *will* see it, and let the right amount of packets out.

But I'm hoping that Martin Devera can check this for me, devik?

Regards,

bert

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
Trilab                                 The Technology People
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux