RE: [RFC PATCH v4 3/3] softirq: defer softirq processing to ksoftirqd if CPU is busy with RT
From: David Laight
Date: Tue Oct 04 2022 - 06:45:58 EST
From: John Stultz
> Sent: 04 October 2022 00:21
>
> From: Pavankumar Kondeti <pkondeti@xxxxxxxxxxxxxx>
>
> Defer the softirq processing to ksoftirqd if a RT task is
> running or queued on the current CPU. This complements the RT
> task placement algorithm which tries to find a CPU that is not
> currently busy with softirqs.
>
> Currently NET_TX, NET_RX, BLOCK and IRQ_POLL softirqs are only
> deferred as they can potentially run for long time.
Deferring NET_RX to ksoftirqd stops the NET_RX code from
running until the RT process completes.
This has exactly the same problems as the softint taking
priority of the RT task - just the other way around.
Under very high traffic loads receive packets get lost.
In many cases that is actually far worse that the wakeup
of an RT process being delayed slightly.
The is no 'one size fits all' answer to the problem.
Plausibly depending on the priority of the RT task
might be useful.
But sometimes it depends on the actual reason for the
wakeup.
For instance a wakeup from an ISR or a hish-res timer
might need lower latency than one from a futex.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)