public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] irq and softirq handler measurement
@ 2005-03-06 23:51 Samo Pogacnik
  0 siblings, 0 replies; 2+ messages in thread
From: Samo Pogacnik @ 2005-03-06 23:51 UTC (permalink / raw)
  To: linux-kernel


Hello,

I'd like to propose a modification of the linux kernel, which enables IRQ and
SOFTIRQ handler measurement. The patch currently covers only i386
architecture, but could be extented to other architectures as well.

I tried to measure time spent in mentioned hendler functions, by summarizing
times spent in every part of their execution. This means that a new nested
interrupt ends one part of time measurement for the first (previously 
running) IRQ or SOFTIRQ and starts a new part of time measurement for the
second (newly started) IRQ.
It may not be the most optimal solution (suggestions are most welcome), but
it's been helpfull to me. Measurements may be usefull, for developing
new drivers or if you are optimising your system.

The linux (2.6.0-test11) patch has not been pasted at the end of the
following usage description, because it is quite long, so here is the URL:
        http://friends.s5.net/pogacnik/patch-2.6.0-test11-usage-0.1.

=======================================================
Usage description:

1. Measure IRQ handlers

This option enables measurement of time spent in each IRQ handler.
Measured data is being displayed through the /proc/interrupts file. The CPU
usage mean value for each IRQ handler and the maximum continuous time spent
in each IRQ handler are being calculated for the time elapsed between two
subsequent reads of the /proc/interrupts file.

2. Measure SOFTIRQ handlers
This option enables measurement of time spent in each SOFTIRQ handler.
Measurement includes every tasklet, that is being registered for this measure
through the tasklet_register() function. The tasklet_init() calls register
tasklets automaticaly.
Measured data is being displayed through the /proc/softirqs file. The CPU
usage mean value for each SOFTIRQ handler and the maximum continuous
time spent in each SOFTIRQ handler are being calculated for the time elapsed
between two subsequent reads of the /proc/softirqs file. Additionally the
number of invocations for each SOFTIRQ handler (as well as for each tasklet)
is being displayed through the /proc/softirqs file.

3. The patch
This linux patch allows you to configure the kernel for compilation
without any of the above options.
First read of interrupts (or softirqs) file can not calculate CPU usage
correctly, because there is no previous time reference.
=======================================================

kind regards to all Linux developers, Samo Pogacnik


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

* Re: [patch] irq and softirq handler measurement
@ 2005-03-07  1:22 Samo Pogacnik
  0 siblings, 0 replies; 2+ messages in thread
From: Samo Pogacnik @ 2005-03-07  1:22 UTC (permalink / raw)
  To: linux-kernel

Hi,

The supplied address of the patch was wrong, because the trailing dot of the 
finished sentence corrupted the URL in the LKML archive.

Correct URL:
        http://friends.s5.net/pogacnik/patch-2.6.0-test11-usage-0.1

--
Samo


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

end of thread, other threads:[~2005-03-07  1:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-06 23:51 [patch] irq and softirq handler measurement Samo Pogacnik
  -- strict thread matches above, loose matches on Subject: below --
2005-03-07  1:22 Samo Pogacnik

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