[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87cz3a3e4y.ffs@tglx>
Date: Mon, 08 May 2023 19:51:41 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Jason Xing <kerneljasonxing@...il.com>,
Liu Jian <liujian56@...wei.com>
Cc: corbet@....net, paulmck@...nel.org, frederic@...nel.org,
quic_neeraju@...cinc.com, joel@...lfernandes.org,
josh@...htriplett.org, boqun.feng@...il.com, rostedt@...dmis.org,
mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
qiang1.zhang@...el.com, jstultz@...gle.com, sboyd@...nel.org,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, peterz@...radead.org, frankwoo@...gle.com,
Rhinewuwu@...gle.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, rcu@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 2/9] softirq: Use sched_clock() based timeout
On Mon, May 08 2023 at 12:08, Jason Xing wrote:
> On Fri, May 5, 2023 at 7:25 PM Liu Jian <liujian56@...wei.com> wrote:
>> @@ -489,7 +490,7 @@ asmlinkage __visible void do_softirq(void)
>> * we want to handle softirqs as soon as possible, but they
>> * should not be able to lock up the box.
>> */
>> -#define MAX_SOFTIRQ_TIME msecs_to_jiffies(2)
>> +#define MAX_SOFTIRQ_TIME (2 * NSEC_PER_MSEC)
>
> I wonder if it affects those servers that set HZ to some different
> values rather than 1000 as default.
The result of msecs_to_jiffies(2) for different HZ values:
HZ=100 1
HZ=250 1
HZ=1000 2
So depending on when the softirq processing starts, this gives the
following ranges in which the timeout ends:
HZ=100 0 - 10ms
HZ=250 0 - 4ms
HZ=1000 1 - 2ms
But as the various softirq handlers have their own notion of timeouts,
loop limits etc. and the timeout is only checked after _all_ pending
bits of each iteration have been processed, the outcome of this is all
lottery.
Due to that the sched_clock() change per se won't have too much impact,
but if the overall changes to consolidate the break conditions are in
place, I think it will have observable effects.
Making this consistent is definitely a good thing, but it won't solve
the underlying problem of soft interrupt processing at all.
We definitely need to spend more thoughts on pulling things out of soft
interrupt context so that these functionalities get under proper
resource control by the scheduler.
Thanks,
tglx
Powered by blists - more mailing lists