Re: [PATCH 1/3] Separate IRQ-stacks from 4K-stacks option

From: Jens Axboe
Date: Mon Sep 13 2004 - 07:35:07 EST


On Mon, Sep 13 2004, Andrea Arcangeli wrote:
> On Mon, Sep 13, 2004 at 09:32:59AM +0200, Jens Axboe wrote:
> > completion from hardirq context, SCSI is the exception since it does it
> > defers the completion to softirq context.
>
> which btw doesn't really make much difference at all to run it in irq
> context with irq enabled since it'll run from irq context anyways and
> you'll still depend on nested hardirqs to avoid huge latencies from
> softirq handlers (the most difference between softirq and hardirq with
> irq enabled happens if you can use spin_lock_bh instead of spin_lock_irq
> in the critical sections to protect against other cpus).
>
> softirq runs inside an hardirq in all common cases, so a softirq is
> still an hardirq and to allow other hardirq to run you need nested
> interrupts in the hardware (which again explains why it's a bad idea to
> forbid nesting by design, and really I don't buy the slowdown argument,
> enter/exit kernel would happen anyways, it's just the pipeline will be
> stalled once and the cache may be trashed a bit, but irqs have not an
> huge memory footprint anyways).

It also does the completion lockless from the softirq context, which I
guess means it's preemptable with Ingo's patches.

The main point of the mail was that SCSI is the exception, not IDE. This
is important to note if Lee thinks that the latency problems with io
completion is IDE only and have been fixed.

--
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 http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/