From: Jakub Kicinski <kuba@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH net-next] net: dev: Always serialize on Qdisc::busylock in __dev_xmit_skb() on PREEMPT_RT.
Date: Mon, 13 Dec 2021 08:15:56 -0800 [thread overview]
Message-ID: <20211213081556.1a575a28@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <YbckZ8VxICTThXOn@linutronix.de>
On Mon, 13 Dec 2021 11:45:59 +0100 Sebastian Andrzej Siewior wrote:
> On 2021-12-10 20:32:56 [-0800], Jakub Kicinski wrote:
> > On Fri, 10 Dec 2021 16:41:44 +0100 Sebastian Andrzej Siewior wrote:
> > > - contended = qdisc_is_running(q);
> > > + if (!IS_ENABLED(CONFIG_PREEMPT_RT))
> > > + contended = qdisc_is_running(q);
> > > + else
> > > + contended = true;
> >
> > Why not:
> >
> > contended = qdisc_is_running(q) || IS_ENABLED(CONFIG_PREEMPT_RT);
>
> I could do that. But I would swap the two arguments so that the
> IS_ENABLED macro comes first and if true qdisc_is_running() is optimized
> away.
FWIW I disagree. My version was more readable. The sprinkling of the
PREEMPT_RT tosh is getting a little annoying. Trying to regress the
clarity of the code should be top of mind here.
next prev parent reply other threads:[~2021-12-13 16:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 15:41 [PATCH net-next] net: dev: Always serialize on Qdisc::busylock in __dev_xmit_skb() on PREEMPT_RT Sebastian Andrzej Siewior
2021-12-10 16:35 ` Paolo Abeni
2021-12-10 16:46 ` Sebastian Andrzej Siewior
2021-12-10 16:52 ` Eric Dumazet
2021-12-10 17:43 ` Sebastian Andrzej Siewior
2021-12-13 10:27 ` Paolo Abeni
2021-12-11 4:32 ` Jakub Kicinski
2021-12-13 10:45 ` Sebastian Andrzej Siewior
2021-12-13 10:53 ` [PATCH v2 " Sebastian Andrzej Siewior
2021-12-13 15:00 ` patchwork-bot+netdevbpf
2021-12-13 16:15 ` Jakub Kicinski [this message]
2021-12-13 16:18 ` [PATCH " Sebastian Andrzej Siewior
2021-12-13 16:20 ` Jakub Kicinski
2021-12-13 16:32 ` Sebastian Andrzej Siewior
2021-12-13 16:29 ` [PATCH net-next] net: dev: Change the order of the arguments for the contended condition Sebastian Andrzej Siewior
2021-12-14 12:40 ` patchwork-bot+netdevbpf
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=20211213081556.1a575a28@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.de \
/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).