From: Matthew Wilcox <willy@infradead.org>
To: Liao Chang <liaochang1@huawei.com>
Cc: mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com,
tglx@linutronix.de, clg@kaod.org, nitesh@redhat.com,
edumazet@google.com, peterz@infradead.org, joshdon@google.com,
masahiroy@kernel.org, nathan@kernel.org,
akpm@linux-foundation.org, vbabka@suse.cz, gustavoars@kernel.org,
arnd@arndb.de, chris@chrisdown.name, dmitry.torokhov@gmail.com,
linux@rasmusvillemoes.dk, daniel@iogearbox.net,
john.ogness@linutronix.de, will@kernel.org, dave@stgolabs.net,
frederic@kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, heying24@huawei.com,
guohanjun@huawei.com, weiyongjun1@huawei.com
Subject: Re: [RFC 0/3] softirq: Introduce softirq throttling
Date: Wed, 6 Apr 2022 15:54:28 +0100 [thread overview]
Message-ID: <Yk2ppI60P98E2Qj5@casper.infradead.org> (raw)
In-Reply-To: <20220406025241.191300-1-liaochang1@huawei.com>
On Wed, Apr 06, 2022 at 10:52:38AM +0800, Liao Chang wrote:
> Kernel check for pending softirqs periodically, they are performed in a
> few points of kernel code, such as irq_exit() and __local_bh_enable_ip(),
> softirqs that have been activated by a given CPU must be executed on the
> same CPU, this characteristic of softirq is always a potentially
> "dangerous" operation, because one CPU might be end up very busy while
> the other are most idle.
>
> Above concern is proven in a networking user case: recenlty, we
> engineer find out the time used for connection re-establishment on
> kernel v5.10 is 300 times larger than v4.19, meanwhile, softirq
> monopolize almost 99% of CPU. This problem stem from that the connection
> between Sender and Receiver node get lost, the NIC driver on Sender node
> will keep raising NET_TX softirq before connection recovery. The system
> log show that most of softirq is performed from __local_bh_enable_ip(),
> since __local_bh_enable_ip is used widley in kernel code, it is very
> easy to run out most of CPU, and the user-mode application can't obtain
> enough CPU cycles to establish connection as soon as possible.
Shouldn't you fix that bug instead? This seems like papering over the
bad effects of a bug and would make it harder to find bugs like this in
the future. Essentially, it's the same as a screaming hardware interrupt,
except that it's a software interrupt, so we can fix the bug instead of
working around broken hardware.
next prev parent reply other threads:[~2022-04-06 16:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 2:52 [RFC 0/3] softirq: Introduce softirq throttling Liao Chang
2022-04-06 2:52 ` [RFC 1/3] softirq: Add two parameters to control CPU bandwidth for use by softirq Liao Chang
2022-04-06 2:52 ` [RFC 2/3] softirq: Do throttling when softirqs use up its bandwidth Liao Chang
2022-04-06 2:52 ` [RFC 3/3] softirq: Introduce statistics about softirq throttling Liao Chang
2022-04-06 14:54 ` Matthew Wilcox [this message]
2022-04-07 12:47 ` [RFC 0/3] softirq: Introduce " Thomas Gleixner
2022-04-07 10:57 ` Thomas Gleixner
-- strict thread matches above, loose matches on Subject: below --
2022-04-06 2:27 Liao Chang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yk2ppI60P98E2Qj5@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=chris@chrisdown.name \
--cc=clg@kaod.org \
--cc=daniel@iogearbox.net \
--cc=dave@stgolabs.net \
--cc=dmitry.torokhov@gmail.com \
--cc=edumazet@google.com \
--cc=frederic@kernel.org \
--cc=guohanjun@huawei.com \
--cc=gustavoars@kernel.org \
--cc=heying24@huawei.com \
--cc=john.ogness@linutronix.de \
--cc=joshdon@google.com \
--cc=keescook@chromium.org \
--cc=liaochang1@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=nathan@kernel.org \
--cc=nitesh@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
--cc=weiyongjun1@huawei.com \
--cc=will@kernel.org \
--cc=yzaikin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).