Re: [PATCH V7 4/4] softirq: Allow early break the softirq processing loop

From: Thomas Gleixner
Date: Mon Sep 28 2020 - 06:09:31 EST


On Mon, Sep 28 2020 at 11:22, Peter Zijlstra wrote:

> On Tue, Sep 15, 2020 at 07:56:09PM +0800, qianjun.kernel@xxxxxxxxx wrote:
>> +/*
>> + * The pending_next_bit is recorded for the next processing order when
>> + * the loop is broken. This per cpu variable is to solve the following
>> + * scenarios:
>
> This, that adds all that complexity, and I think it's wrong. The
> softirqs are priority ordered. Running then again from 0 up if/when you
> break seems 'right'.

No. If you break the loop and then restart from 0 you can starve the
higher numbered ones if the next loop terminates on early because one of
the lower one takes too long. Made that happen with networking :)

See the variant I proposed :)

Thanks,

tglx