Re: softirq considered harmful

From: Jens Axboe
Date: Mon Aug 14 2006 - 03:30:40 EST

On Sat, Aug 12 2006, Andrew Morton wrote:
> On Sat, 12 Aug 2006 17:43:24 -0700 (PDT)
> David Miller <davem@xxxxxxxxxxxxx> wrote:
> > From: Andrew Morton <akpm@xxxxxxxx>
> > Date: Sat, 12 Aug 2006 16:28:57 -0700
> >
> > > Maybe I missed the discussion. But if not, this is yet another case of
> > > significant changes getting into mainline via a git merge and sneaking
> > > under everyone's radar.
> >
> > Scsi has been doing command completions via a per-cpu softirq handler
> > for as long as we've had an SMP more advanced than lock_kernel() :-)
> Is that also adding 150 usecs to each IO operation?

It is, it's the identical mechanism. SCSI used to do completions via
tasklets, it was converted to softirqs a long time ago but I don't think
anyone ever did timings on it to my knowledge... From the few timings I
showed, 150 usec is a _best_ case time on my hardware. 10 msecs was seen
as well, which is just bad beyond describing.

My suggestion (I'll code this up) is that we scrap the softirq
completion and just do it from the irq event. The typical completion
doesn't even need to grab any locks.

Jens Axboe

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at