public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Elad Lahav <elad_lahav@users.sourceforge.net>
To: linux-kernel@vger.kernel.org
Subject: Soft IRQ statistics under /proc/stat
Date: Thu, 11 Sep 2008 21:38:05 -0400	[thread overview]
Message-ID: <48C9C7FD.3060609@users.sourceforge.net> (raw)

I've been observing some oddities in the statistics produced by mpstat 
with respect to soft IRQs (for example, considerable soft IRQ time on 
processors sending UDP packets on dummy NICs). While looking at the 
kernel code, I noticed that ticks are attributed to soft IRQs when 
softirq_count() is greater than 0. This happens in __local_bh_disable(), 
which is called from __do_softirq(), but also from local_bh_disable(). 
Thus, the number of ticks reported in /proc/stat refers to any execution 
path that runs with soft IRQs disabled, not just code called from 
__do_softirq().
I hacked the kernel to differentiate between the two cases, and indeed 
the anomalies I saw can be explained as code executing under 
local_bh_disable().

Is this behaviour by design? References to /proc/stat on the web refer 
to this number simply as "soft IRQ time" (e.g., 
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/Reference_Guide/s2-proc-stat.html). 
I would have expected that to include only execution paths starting from 
__do_softirq().

Elad

             reply	other threads:[~2008-09-12  1:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12  1:38 Elad Lahav [this message]
2008-09-15 14:16 ` Soft IRQ statistics under /proc/stat Elad Lahav

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=48C9C7FD.3060609@users.sourceforge.net \
    --to=elad_lahav@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox