From: Jason Xing <kerneljasonxing@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jason Xing <kernelxing@tencent.com>
Subject: Re: [PATCH net] net: fix raising a softirq on the current cpu with rps enabled
Date: Mon, 27 Mar 2023 10:25:31 +0800 [thread overview]
Message-ID: <CAL+tcoB+xAQWCjznDTmNRfzebJcKa_mTx7-drLWBk_wWbd=G6A@mail.gmail.com> (raw)
In-Reply-To: <CANn89iJLdce57j6fPbLpexp=tzTtw9yDwV7wjT5FbNF6fPkk+g@mail.gmail.com>
On Mon, Mar 27, 2023 at 1:35 AM Eric Dumazet <edumazet@google.com> wrote:
>
> >
> > Forgive me. Really I need some coffee. I made a mistake. This line
> > above should be:
> >
> > + if (!test_bit(NAPI_STATE_SCHED, &mysd->backlog.state))
> >
> > But the whole thing doesn't feel right. I need a few days to dig into
> > this part until Eric can help me with more of it.
> >
>
> I am still traveling, and this is weekend time :/
Thanks for your time, Eric, really appreciate it.
>
> It should not be too hard to read net/core/dev.c and remember that not
> _all_ drivers (or some core networking functions) use the NAPI model.
>
> eg look at netif_rx() and ask yourself why your patch is buggy.
Yes, it is. In my last email I sent yesterday I encountered one issue
which exactly happened when I started hundreds of iperf processes
transmitting data to loopback.
It got stuck :( So I realized it is the non-napi case that triggers
such a problem.
>
> Just look at callers of enqueue_to_backlog() and ask yourself if all
> of them are called from net_rx_action()
>
> [The answer is no, just in case you wonder]
>
> In order to add your optimization, more work is needed, like adding
> new parameters so that we do not miss critical
> __raise_softirq_irqoff(NET_RX_SOFTIRQ) when _needed_.
Thanks, I need to do more work/study on it.
>
> We keep going circles around softirq deficiencies, I feel you are
> trying to fix a second-order 'issue'.
Right, going circles gives me a headache.
>
> Real cause is elsewhere, look at recent patches from Jakub.
After you pointed out, I searched and found there is indeed one patchset in 2022
The tile like this:
[PATCH 0/3] softirq: uncontroversial change
Thanks,
Jason
>
> Thanks.
next prev parent reply other threads:[~2023-03-27 2:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-25 15:24 [PATCH net] net: fix raising a softirq on the current cpu with rps enabled Jason Xing
2023-03-25 15:56 ` Eric Dumazet
2023-03-26 3:27 ` Jason Xing
2023-03-26 4:04 ` Jason Xing
2023-03-26 10:10 ` Jason Xing
2023-03-26 14:56 ` Jason Xing
2023-03-26 17:35 ` Eric Dumazet
2023-03-27 2:25 ` Jason Xing [this message]
[not found] ` <20230326013845.2110-1-hdanton@sina.com>
2023-03-26 3:30 ` Jason Xing
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='CAL+tcoB+xAQWCjznDTmNRfzebJcKa_mTx7-drLWBk_wWbd=G6A@mail.gmail.com' \
--to=kerneljasonxing@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernelxing@tencent.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).