public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* System tick rate
@ 2009-03-12 13:38 Jan Engelhardt
  2009-03-12 14:21 ` Arjan van de Ven
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2009-03-12 13:38 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Hi,


is there an "official" way of obtaining the current tick rate when 
CONFIG_NO_HZ? This is for a simple statistics display tool. Counting the 
interrupts from /proc/interrupts (calculating the difference between two 
timepoints) seems to work, though I have seen at least one x86 machine 
where both IRQ0 and the LOC counters increase, making it not entirely 
obvious which number to take as a base. Suggestions?

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

* Re: System tick rate
  2009-03-12 13:38 System tick rate Jan Engelhardt
@ 2009-03-12 14:21 ` Arjan van de Ven
  2009-03-12 14:45   ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Arjan van de Ven @ 2009-03-12 14:21 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Linux Kernel Mailing List

On Thu, 12 Mar 2009 14:38:19 +0100 (CET)
Jan Engelhardt <jengelh@medozas.de> wrote:

> Hi,
> 
> 
> is there an "official" way of obtaining the current tick rate when 
> CONFIG_NO_HZ? 

what does "current tick rate" mean for you in a no-hz situation ?
is it the HZ value (which is supposed to be invisible from userspace,
so good luck) or the wakeup count ?



-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

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

* Re: System tick rate
  2009-03-12 14:21 ` Arjan van de Ven
@ 2009-03-12 14:45   ` Jan Engelhardt
  2009-03-13  8:49     ` Peter Zijlstra
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2009-03-12 14:45 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Linux Kernel Mailing List


On Thursday 2009-03-12 15:21, Arjan van de Ven wrote:
>On Thu, 12 Mar 2009 14:38:19 +0100 (CET) Jan Engelhardt wrote:
>> 
>> is there an "official" way of obtaining the current tick rate when 
>> CONFIG_NO_HZ? 
>
>what does "current tick rate" mean for you in a no-hz situation ?
>is it the HZ value (which is supposed to be invisible from userspace,
>so good luck) or the wakeup count ?

Hm, I guess what I want is the number of timer interrupts which
occurred within the observation period that called the scheduler
code. (So that excludes RTC on usual x86en.)

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

* Re: System tick rate
  2009-03-12 14:45   ` Jan Engelhardt
@ 2009-03-13  8:49     ` Peter Zijlstra
  2009-03-16 18:11       ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Zijlstra @ 2009-03-13  8:49 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Arjan van de Ven, Linux Kernel Mailing List

On Thu, 2009-03-12 at 15:45 +0100, Jan Engelhardt wrote:
> On Thursday 2009-03-12 15:21, Arjan van de Ven wrote:
> >On Thu, 12 Mar 2009 14:38:19 +0100 (CET) Jan Engelhardt wrote:
> >> 
> >> is there an "official" way of obtaining the current tick rate when 
> >> CONFIG_NO_HZ? 
> >
> >what does "current tick rate" mean for you in a no-hz situation ?
> >is it the HZ value (which is supposed to be invisible from userspace,
> >so good luck) or the wakeup count ?
> 
> Hm, I guess what I want is the number of timer interrupts which
> occurred within the observation period that called the scheduler
> code. (So that excludes RTC on usual x86en.)

There is no tick rate with NO_HZ mode, only a max tick rate, but as
Arjan said, not even that is exposed to user-space.

I think Dave's Niagra has the crown here, because he ran into some bug
in the NO_HZ code some while back because he idled longer than we ever
seen before. I think it was in the order of 30 minutes or something
without a single wakeup of the CPU.





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

* Re: System tick rate
  2009-03-13  8:49     ` Peter Zijlstra
@ 2009-03-16 18:11       ` Jan Engelhardt
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2009-03-16 18:11 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Arjan van de Ven, Linux Kernel Mailing List


On Friday 2009-03-13 09:49, Peter Zijlstra wrote:
>On Thu, 2009-03-12 at 15:45 +0100, Jan Engelhardt wrote:
>> On Thursday 2009-03-12 15:21, Arjan van de Ven wrote:
>> >On Thu, 12 Mar 2009 14:38:19 +0100 (CET) Jan Engelhardt wrote:
>> >> 
>> >> is there an "official" way of obtaining the current tick rate when 
>> >> CONFIG_NO_HZ? 
>> >
>> >what does "current tick rate" mean for you in a no-hz situation ?
>> >is it the HZ value (which is supposed to be invisible from userspace,
>> >so good luck) or the wakeup count ?
>> 
>> Hm, I guess what I want is the number of timer interrupts which
>> occurred within the observation period that called the scheduler
>> code. (So that excludes RTC on usual x86en.)
>
>There is no tick rate with NO_HZ mode, only a max tick rate, but as
>Arjan said, not even that is exposed to user-space.
>
>I think Dave's Niagra has the crown here, because he ran into some bug
>in the NO_HZ code some while back because he idled longer than we ever
>seen before. I think it was in the order of 30 minutes or something
>without a single wakeup of the CPU.
>
Well if it idled that long, it surely did not run any processes, did it?

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

end of thread, other threads:[~2009-03-16 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-12 13:38 System tick rate Jan Engelhardt
2009-03-12 14:21 ` Arjan van de Ven
2009-03-12 14:45   ` Jan Engelhardt
2009-03-13  8:49     ` Peter Zijlstra
2009-03-16 18:11       ` Jan Engelhardt

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