public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber•org>
To: yushengjin <yushengjin@uniontech•com>
Cc: pablo@netfilter•org, kadlec@netfilter•org, roopa@nvidia•com,
	razor@blackwall•org, davem@davemloft•net, edumazet@google•com,
	kuba@kernel•org, pabeni@redhat•com,
	netfilter-devel@vger•kernel.org, coreteam@netfilter•org,
	bridge@lists•linux.dev, netdev@vger•kernel.org,
	linux-kernel@vger•kernel.org
Subject: Re: [PATCH v3] net/bridge: Optimizing read-write locks in ebtables.c
Date: Tue, 24 Sep 2024 06:32:58 -0700	[thread overview]
Message-ID: <20240924063258.1edfb590@fedora> (raw)
In-Reply-To: <14BD7E92B23BF276+20240924090906.157995-1-yushengjin@uniontech.com>

On Tue, 24 Sep 2024 17:09:06 +0800
yushengjin <yushengjin@uniontech•com> wrote:

> When conducting WRK testing, the CPU usage rate of the testing machine was
> 100%. forwarding through a bridge, if the network load is too high, it may
> cause abnormal load on the ebt_do_table of the kernel ebtable module, leading
> to excessive soft interrupts and sometimes even directly causing CPU soft
> deadlocks.
> 
> After analysis, it was found that the code of ebtables had not been optimized
> for a long time, and the read-write locks inside still existed. However, other
> arp/ip/ip6 tables had already been optimized a lot, and performance bottlenecks
> in read-write locks had been discovered a long time ago.
> 
> Ref link: https://lore.kernel.org/lkml/20090428092411.5331c4a1@nehalam/
> 
> So I referred to arp/ip/ip6 modification methods to optimize the read-write
> lock in ebtables.c.

What about doing RCU instead, faster and safer.

  reply	other threads:[~2024-09-24 13:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24  9:09 [PATCH v3] net/bridge: Optimizing read-write locks in ebtables.c yushengjin
2024-09-24 13:32 ` Stephen Hemminger [this message]
2024-09-24 13:46   ` Eric Dumazet
2024-09-24 16:40     ` Stephen Hemminger
2024-09-25  7:45       ` yushengjin

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=20240924063258.1edfb590@fedora \
    --to=stephen@networkplumber$(echo .)org \
    --cc=bridge@lists$(echo .)linux.dev \
    --cc=coreteam@netfilter$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=kadlec@netfilter$(echo .)org \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=pablo@netfilter$(echo .)org \
    --cc=razor@blackwall$(echo .)org \
    --cc=roopa@nvidia$(echo .)com \
    --cc=yushengjin@uniontech$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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