lkml.org 
[lkml]   [1996]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Time spent on interrupt handling
> Would it even be possible to add this kind of acocunting into the kernel?

These are just my potentially wrong ideas on the matter as I am a long way
from a kernel guru ... I would be interested in hearing of any info you
get wrt. this issue especially if any of it disputes any of this stuff.

The current timer interrupt is set at 1000Hz (?) and increments the
jiffies counter. While pentium hardware allows access to a finer
resolution internal clock, I don't think this is possible on 386/486
machines. This means that you are restricted to a 1ms resolution for
measuring time spent in interrupts. Actually since this timer itself is
generated from an interrupt, whether it is incremented or not during say
the tulip interrupt handler will depend on whether the tulip handler
re-enables interrupts on entry. The timer interrupt would then pre-empt
the tulip driver interrupt and increment the jiffies count. A
jiffies_at_end_of_tulip_interrupt_handler -
jiffies_at_start_of_tulip_handler should give you the info you need.

Of course you can't use this method to figure out how much time you spend
in the timer interrupt itself or any interrupt routines that do not allow
the timer interrupt to pre-empt them. Using the on-chip (undocumented?)
pentium timers though should relax all of these restrictions ...

Comments from the gurus?

--Craig


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.026 / U:2.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site