lkml.org 
[lkml]   [2013]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] x86: Lazy disabling of interrupts

* Andi Kleen <andi@firstfloor.org> wrote:

> - That said, I think a software CLI/STI is somewhat useful for
> profiling, as it can allow to measure how long interrupts are delayed by
> CLI/STI. [...]

That could be measured directly in a simpler way, without disrupting
CLI/STI: by turning all IRQs into NMIs and resending them from a special
NMI handler. (and of course timestamping the NMI arrival time and the IRQ
entry time so that instrumentation can recover it.)

If indirect, statistical measurement suffices then IRQ delivery latencies
can also be estimated statistically without any kernel changes: by
profiling IRQ disable/enable sections (there's a counter for that),
calculating average IRQ-disable section length from that. The average IRQ
delay will be 50% of that value, assuming normal distribution of IRQs.
This should be good enough for most cases.

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-10-10 07:21    [W:0.158 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site