[lkml]   [2008]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Improvev netconsole support for RTL8139 NIC driver
David Miller wrote:
> From: Jeff Garzik <>
> Date: Tue, 25 Mar 2008 22:23:24 -0400
>> This is bogus -- you should never need to slow down the hot path in such
>> a way.
> Slow down in what way? Even on x86 saving the flags is just
> about as expensive as a plain sti/cli.

Replacing spin_lock() [current 8139too.c] with spin_lock_irqsave()
results in a larger interrupt handler... more CPU instructions for the
same result.

> I would in fact prefer to see drivers unconditionally use
> spin_lock_irqsave() et al. in the interrupt handler, for
> consistency.

The entire spin_lock() apparatus in the interrupt handler disappears
nicely on uniprocessor machines.

Plus, you are not competing with any other interrupts other than your
own, which is the only major class of problems where spin_lock_irqsave()
in interrupt handler is really needed (PS/2 kbd + mouse is an example).

Or more simply, it's not needed, so nothing is gained by doing
additional work in the hot path for the sake of consistency.


 \ /
  Last update: 2008-03-26 04:17    [W:0.112 / U:0.532 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site