Re: userspace irq balancer

Andrea Arcangeli
2003-05-27T11:40:02Z

On Mon, May 26, 2003 at 11:11:20PM -0700, David S. Miller wrote:
> From: Andrea Arcangeli <andrea@suse.de>
> 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