public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* cpufreq affects traffic control rates
@ 2007-08-28  7:51 DervishD
  2007-08-28 22:23 ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: DervishD @ 2007-08-28  7:51 UTC (permalink / raw)
  To: Linux-kernel

    Hi all :)

    I noticed lately that my traffic control rates were being very slow,
about 40% less than expected, and finally spotted the problem: cpufreq.

    Looks like HTB puts buckets according to the requested rate but
assuming that the CPU is running at its default clock or something like
that.

    Any way of fixing this without disabling cpufreq?

    I'm using kernel 2.6.20.14, Athlon64 1000/1800MHz, HZ=1000 and a
combination of HTB/SFQ in my traffic control.

    Thanks a lot in advance :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cpufreq affects traffic control rates
  2007-08-28  7:51 cpufreq affects traffic control rates DervishD
@ 2007-08-28 22:23 ` Stephen Hemminger
  2007-08-29  7:59   ` DervishD
  2007-08-29 15:26   ` Jan Engelhardt
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Hemminger @ 2007-08-28 22:23 UTC (permalink / raw)
  To: DervishD; +Cc: Linux-kernel

On Tue, 28 Aug 2007 09:51:55 +0200
DervishD <lkml@dervishd.net> wrote:

>     Hi all :)
> 
>     I noticed lately that my traffic control rates were being very slow,
> about 40% less than expected, and finally spotted the problem: cpufreq.
> 
>     Looks like HTB puts buckets according to the requested rate but
> assuming that the CPU is running at its default clock or something like
> that.
> 
>     Any way of fixing this without disabling cpufreq?
> 
>     I'm using kernel 2.6.20.14, Athlon64 1000/1800MHz, HZ=1000 and a
> combination of HTB/SFQ in my traffic control.
> 
>     Thanks a lot in advance :)
> 
>     Raúl Núñez de Arenas Coronado
> 

Is the problem configuration of network scheduler clock? In 2.6.20 and earlier, you
could use CPU cycle counter (later kernels only use time of day).  So try
switching to jiffies or gettimeofday.

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cpufreq affects traffic control rates
  2007-08-28 22:23 ` Stephen Hemminger
@ 2007-08-29  7:59   ` DervishD
  2007-08-29 15:26   ` Jan Engelhardt
  1 sibling, 0 replies; 5+ messages in thread
From: DervishD @ 2007-08-29  7:59 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Linux-kernel

    Hi Stephen :)

 * Stephen Hemminger <shemminger@linux-foundation.org> dixit:
> On Tue, 28 Aug 2007 09:51:55 +0200 DervishD <lkml@dervishd.net>
> wrote:
> >     I noticed lately that my traffic control rates were being very
> >     slow, about 40% less than expected, and finally spotted the
> >     problem: cpufreq.
> 
> Is the problem configuration of network scheduler clock? In 2.6.20 and
> earlier, you could use CPU cycle counter (later kernels only use time
> of day).  So try switching to jiffies or gettimeofday.

    Yes, the problem is that I'm stupid and I thought I was using
jiffies, but I have CONFIG_NET_SCH_CLK_CPU. I'll rebuild my kernel ASAP
and set the proper value...

    Thanks for your help. It's embarrassing I didn't check the clock
source for the packet scheduler...

    Sorry for the noise.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cpufreq affects traffic control rates
  2007-08-28 22:23 ` Stephen Hemminger
  2007-08-29  7:59   ` DervishD
@ 2007-08-29 15:26   ` Jan Engelhardt
  2007-08-29 17:20     ` Stephen Hemminger
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2007-08-29 15:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: DervishD, Linux-kernel


On Aug 28 2007 15:23, Stephen Hemminger wrote:
>>     I noticed lately that my traffic control rates were being very slow,
>> about 40% less than expected, and finally spotted the problem: cpufreq.
>> 
>>     Looks like HTB puts buckets according to the requested rate but
>> assuming that the CPU is running at its default clock or something like
>> that.
>> 
>Is the problem configuration of network scheduler clock? In 2.6.20 and earlier, you
>could use CPU cycle counter (later kernels only use time of day).  So try
>switching to jiffies or gettimeofday.

This should not have been removed. CPUs with constant_tsc
could still be used with "CPU cycle counter" method.


	Jan
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cpufreq affects traffic control rates
  2007-08-29 15:26   ` Jan Engelhardt
@ 2007-08-29 17:20     ` Stephen Hemminger
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2007-08-29 17:20 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: DervishD, Linux-kernel

On Wed, 29 Aug 2007 17:26:24 +0200 (CEST)
Jan Engelhardt <jengelh@computergmbh.de> wrote:

> 
> On Aug 28 2007 15:23, Stephen Hemminger wrote:
> >>     I noticed lately that my traffic control rates were being very slow,
> >> about 40% less than expected, and finally spotted the problem: cpufreq.
> >> 
> >>     Looks like HTB puts buckets according to the requested rate but
> >> assuming that the CPU is running at its default clock or something like
> >> that.
> >> 
> >Is the problem configuration of network scheduler clock? In 2.6.20 and earlier, you
> >could use CPU cycle counter (later kernels only use time of day).  So try
> >switching to jiffies or gettimeofday.
> 
> This should not have been removed. CPUs with constant_tsc
> could still be used with "CPU cycle counter" method.
> 
> 
> 	Jan

It was removed because the core clock subsystem now manages the choice
of CPU clock correctly and should provide the highest resolution possible
on the hardware.

Plus a whole bunch of grotty macro code gets removed. And the math
handling was more standard/simpler.

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-29 17:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-28  7:51 cpufreq affects traffic control rates DervishD
2007-08-28 22:23 ` Stephen Hemminger
2007-08-29  7:59   ` DervishD
2007-08-29 15:26   ` Jan Engelhardt
2007-08-29 17:20     ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox