On Fri, 2007-06-22 at 22:00 +0100, Christoph Hellwig wrote:
> Note that we also have a lot of inefficiency in the way we do deferred
> processing. Think of a setup where you run a XFS filesystem runs over
> a megaraid adapter.
>
> (1) we get a real hardirq, which just clears the interrupt and then
> deferes to a tasklet
> (2) tasklet walks the producer / consumer queue and then calls scsi_done
> for each completeted scsi command which ends up doing
> raise_softirq_irqoff(BLOCK_SOFTIRQ);
> (3) block softirq does the heavy lifting for command completion and finally
> calls back into the bio's completion routine
> (4) xfs wants to avoid irq safe locking and thus deferes the command to a
> kthread
>
> This is rather inefficient due to all the (semi-)context switches already
> and not by far the worst setup given that a lot of dm modules can involve
> another thread in the process.
>
> Now if just plain convert tasklets to a thread based abstraction this
> existing code becomes really dumb because we go from hardirq to process
> context to go back to softirq context to go back to process context.
>
> Ouch!
>
> I think we need to put a little more though into how we can optimize our
> irq path for the full stack. Using irqthreads in an intelligent way might
> be one option, but we'll need a lot of heavy benchmarking whatever way
> we go.
Your above scenario screams for a threaded interrupt handler, where you
actually can unify a lot of this into one single context.
tglx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]