Re: userspace irq balancer

From: Andrea Arcangeli (andrea@suse.de)
Date: Tue May 27 2003 - 06:56:25 EST


On Mon, May 26, 2003 at 11:11:20PM -0700, David S. Miller wrote:
> From: Andrea Arcangeli <andrea@xxxxxxx>
> Date: Tue, 27 May 2003 03:26:17 +0200
>
> I argue with that, NAPI needs to poll somehow, either you hook into the
> kernel slowing down every single schedule, or you need to offload this
> work to a kernel thread.
>
> You've never shown what this "offloading work to a kernel thread"
> actually accomplishes.

in case it wasn't obvious (that is the whole point of ksoftirqd) what
accomplishes in a single word is "fairness" and "not starving userspace
during networking".

> What I've seen it do is decrease the amount of total softirq work that
> cpu can get done. And avoiding ksoftirqd actually running makes
> performance get better.

sure, as far as you don't care about anything but the network load. I
mean, if you can't care less of the userspae progress and you don't want
the usual scheduler fariness guarantees, then you can hack the kernel
and replace the ksoftirqd with an infinite loop and networking will
certainly perform better since it will be able to stall indefinitely all
userspace computations in favour of pure irq driven networking I/O
running all in irq context and never ending.

I really thought this was obvious to everybody, otherwise there would be
no point for ksoftirqd at all if you can't care less to hang userspace
indefinitely.

Andrea
-
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/