All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Gallatin <gallatin@myri.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Rick Jones <rick.jones2@hp.com>, Brice Goglin <brice@myri.com>
Subject: IRQ / SoftIRQ CPU time accounting broken by 457533a7d3402d1d91fbc125c8bd1bd16dcd3cd4
Date: Thu, 23 Apr 2009 10:19:38 -0400	[thread overview]
Message-ID: <49F078FA.6010507@myri.com> (raw)

When running netperf for some 10GbE tests, I noticed
that  IRQ and SOFTIRQ CPU time is no longer reported for an
otherwise idle CPU on recent kernels, at least for x86_64.

If I take a 2-CPU system, and bind the NIC IRQ to CPU0, and
bind the user-space netserver daemon to CPU1, the problem
is obvious when blasting 10Gb/s of traffic at it.  I see
no CPU used for irq or softirq on CPU0, even though it is
handling 13K interrupts/sec:



% mpstat -P 0 1
Linux 2.6.30-rc1 (venice)       04/22/09

11:25:25     CPU   %user   %nice %system %iowait    %irq   %soft   %idle 
    intr/s
11:25:26       0    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
  13248.00
11:25:27       0    0.00    0.00    0.00    0.00    0.00    0.00  100.00 
  13280.00

Common sense tells me that is wrong, and oprofile verifies there is
a lot happening on CPU0.  Further, when I run a cpu-soaker in
usermode bound to CPU0, I start to see irq, softirq, etc,
being correctly identified:

11:28:02     CPU   %user   %nice %system %iowait    %irq   %soft   %idle 
    intr/s
11:28:03       0   45.10    0.00    0.00    0.00    1.96   52.94    0.00 
  13019.61
11:28:04       0   46.46    0.00    0.00    0.00    2.02   51.52    0.00 
  13414.14

The problem is observable, but much less obvious when using a more
common, e1000 1GbE NIC (15% softirq is missing, rather than 50%).

I spent a few hours git-bisecting until I finally got here:

% git-bisect bad
Bisecting: 0 revisions left to test after this
[457533a7d3402d1d91fbc125c8bd1bd16dcd3cd4] fix scaled & unscaled cputime 
accounting

I have neither CONFIG_NO_HZ, CONFIG_VIRT_CPU_ACCOUNTING, or XEN configured.

Drew

             reply	other threads:[~2009-04-23 14:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23 14:19 Andrew Gallatin [this message]
2009-04-28 23:30 ` IRQ / SoftIRQ CPU time accounting broken by 457533a7d3402d1d91fbc125c8bd1bd16dcd3cd4 Andrew Morton
2009-04-29  5:01   ` Eric Dumazet
2009-04-29  7:46     ` [PATCH] sched: account system time properly Eric Dumazet
2009-04-29  8:08       ` Martin Schwidefsky
2009-04-29  9:20         ` Eric Dumazet
2009-04-29  9:48           ` Martin Schwidefsky
2009-04-29 10:24             ` Ingo Molnar
2009-04-29 12:44               ` Eric Dumazet
2009-04-29 13:09                 ` [tip:sched/urgent] " tip-bot for Eric Dumazet
2009-04-29 14:58                   ` Andrew Morton
2009-04-29 19:06                     ` Ingo Molnar
2009-04-29 13:23                 ` [PATCH] " Andrew Gallatin
2009-04-29  8:02   ` IRQ / SoftIRQ CPU time accounting broken by 457533a7d3402d1d91fbc125c8bd1bd16dcd3cd4 Martin Schwidefsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49F078FA.6010507@myri.com \
    --to=gallatin@myri.com \
    --cc=brice@myri.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rick.jones2@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.