* Andi Kleen <a...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
  • ... H. Peter Anvin
    • ... Andi Kleen
      • ... Steven Rostedt
        • ... David Miller
          • ... Steven Rostedt
      • ... Ingo Molnar
    • ... David Miller
      • ... Borislav Petkov
        • ... Steven Rostedt
          • ... Borislav Petkov
    • ... Steven Rostedt <rost...@goodmis.org> (by way of Steven Rostedt <rost...@goodmis.org>) (by way of Steven Rostedt
      • ... anish singh

Reply via email to