Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 12-20-2010, 10:58 AM   #1
Registered: Sep 2004
Distribution: Debian Testing / Unstable
Posts: 171
Blog Entries: 1

Rep: Reputation: 30
Tickless Kernel yet still get many IRQ0 timer interrupts

I've been trying for awhile to figure out why so many timer (IRQ0) interrupts occur on my ASUS B202 with Intel Atom N270 processor. I've tried to alter the way the interrupts are distributed by turning off SMP (hotplug CPU1 offline), turning off hyperthreading (CONFIG_SCHED_SMT), IRQ load balancing (fails for IRQ0 with write I/O error) and still the IRQ0 interrupts persist. About 50% of the timer interrupts are occurring on IRQ0, the rest are distributed to the local APICs (LOC). Here is the output of '/proc/interrupts' and 'mpstat -I ALL' (IRQ0 intr/s in bold):

         CPU0       CPU1       
  0:  147644984          0   IO-APIC-edge      timer
  1:          2          0   IO-APIC-edge      i8042
  8:          1          0   IO-APIC-edge      rtc0
  9:          0          0   IO-APIC-fasteoi   acpi
 12:          4          0   IO-APIC-edge      i8042
 14:    1016152          0   IO-APIC-edge      ata_piix
 15:          0          0   IO-APIC-edge      ata_piix
 16:    4480183          0   IO-APIC-fasteoi   uhci_hcd:usb5, i915, HDA Intel
 18:          0          0   IO-APIC-fasteoi   uhci_hcd:usb4
 19:      66843          0   IO-APIC-fasteoi   uhci_hcd:usb3
 23:    2476374          0   IO-APIC-fasteoi   ehci_hcd:usb1, uhci_hcd:usb2
 27:    4626358          0   PCI-MSI-edge      eth0
NMI:          0          0   Non-maskable interrupts
LOC:   55980621  131095825   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:          0          0   Performance monitoring interrupts
PND:          0          0   Performance pending work
RES:     830935     914266   Rescheduling interrupts
CAL:        108        255   Function call interrupts
TLB:      49985      47908   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:       1429       1429   Machine check polls
ERR:          1
MIS:          0

Linux 2.6.32-interactive-5-atom (asusb202) 	12/20/2010 	_i686_	(2 CPU)

11:44:11 AM  CPU    intr/s
11:44:11 AM  all    815.19

11:44:11 AM  CPU     0/s     1/s     8/s     9/s    12/s    14/s    15/s    16/s    18/s    19/s    23/s    27/s   NMI/s   LOC/s   SPU/s   PMI/s   PND/s   RES/s   CAL/s   TLB/s   TRM/s   THR/s   MCE/s   MCP/s   ERR/s   MIS/s
11:44:11 AM    0  344.64    0.00    0.00    0.00    0.00    2.37    0.00   10.46    0.00    0.16    5.78   10.80    0.00  130.67    0.00    0.00    0.00    1.94    0.00    0.12    0.00    0.00    0.00    0.00    0.00    0.00
11:44:11 AM    1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  306.01    0.00    0.00    0.00    2.13    0.00    0.11    0.00    0.00    0.00    0.00    0.00    0.00
The efforts I made to try and alter the timer behavior were actually a first stab at trying to understand the 'CONFIG_NO_HZ' logic and timer architecture, because the large number of IRQ0 interrupts stood out when compared to two other machines I have (Dell Inspiron 531 w/AMD Athlon dual core and Dell Inspiron 3000 with Pentium 4 uniprocessor), both of which show only a few IRQ0 interrupts, all other timer interrupts handled by local APIC(s). I've been looking in the kernel source ('linux/kernel/time', 'linux/arch/x86/kernel/irqinit.c', etc.) and the specific actions and paths taken to wire up IRQ0 are not crystal clear to me at this point (there are a lot of functions to keep in my head simultaneously ).

If anyone can shed some light on this phenomenon and/or point me to some specific places in the code that would help me get clear I would appreciate it. I know it might not be a case of there being 'something wrong' but, as I mentioned, this is the only machine I see this happening with and I probably wouldn't care if ALL machines received 300 IRQ0 intr/s instead of just this one. Thanks in advance.
Old 01-02-2011, 11:32 AM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,571

Rep: Reputation: 180Reputation: 180
If you get 300 ints/sec, I'd say you probably do not have CONFIG_NO_HZ really enabled. I'd start from checking the configuration you build your kernel with.
Old 02-23-2011, 02:31 AM   #3
LQ Newbie
Registered: Feb 2011
Location: Stockholm and Shenzhen
Distribution: Ubuntu
Posts: 1

Rep: Reputation: 0
How can this be tested?

Is there any way to know if the NO_HZ is enabled? And also, if this is not enabled, is it possible to change the tick duration or enable the NO_HZ without recompiling the kernel?
in /proc/timer_list I can see lots of hrtimer_wakeup
and it says: .nohz_mode :2
when cat /proc/interrupts twice using sleep 1 between, I get about 170.
(This is on an ARM based device running Kernel 2.5.29)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mask local timer interrupts in user space? davehfa Linux - General 3 10-31-2010 08:59 AM
[SOLVED] generating timer interrupts in C yaami Programming 3 07-24-2010 02:59 AM
tickless kernel? mcnalu Slackware 8 12-24-2009 04:16 AM
LXer: The Impact Of A Tickless Kernel LXer Syndicated Linux News 0 02-25-2007 06:16 AM
Need to disable timer or all interrupts from user space G35Coupe Linux - General 0 11-16-2004 12:31 AM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration