From: Jakub Kicinski <kuba@kernel.org>
To: "Chia-Yu Chang (Nokia)" <chia-yu.chang@nokia-bell-labs.com>
Cc: "alok.a.tiwari@oracle.com" <alok.a.tiwari@oracle.com>,
"pctammela@mojatatu.com" <pctammela@mojatatu.com>,
"horms@kernel.org" <horms@kernel.org>,
"donald.hunter@gmail.com" <donald.hunter@gmail.com>,
"xandfury@gmail.com" <xandfury@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"dave.taht@gmail.com" <dave.taht@gmail.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"jhs@mojatatu.com" <jhs@mojatatu.com>,
"stephen@networkplumber.org" <stephen@networkplumber.org>,
"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
"jiri@resnulli.us" <jiri@resnulli.us>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"ast@fiberby.net" <ast@fiberby.net>,
"liuhangbin@gmail.com" <liuhangbin@gmail.com>,
"shuah@kernel.org" <shuah@kernel.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"ij@kernel.org" <ij@kernel.org>,
"ncardwell@google.com" <ncardwell@google.com>,
"Koen De Schepper (Nokia)" <koen.de_schepper@nokia-bell-labs.com>,
"g.white@cablelabs.com" <g.white@cablelabs.com>,
"ingemar.s.johansson@ericsson.com"
<ingemar.s.johansson@ericsson.com>,
"mirja.kuehlewind@ericsson.com" <mirja.kuehlewind@ericsson.com>,
"cheshire@apple.com" <cheshire@apple.com>,
"rs.ietf@gmx.at" <rs.ietf@gmx.at>,
"Jason_Livingood@comcast.com" <Jason_Livingood@comcast.com>,
"vidhi_goel@apple.com" <vidhi_goel@apple.com>
Subject: Re: [PATCH v20 net-next 1/6] sched: Struct definition and parsing of dualpi2 qdisc
Date: Tue, 1 Jul 2025 16:30:53 -0700 [thread overview]
Message-ID: <20250701163053.22113645@kernel.org> (raw)
In-Reply-To: <PAXPR07MB798432A7A8B078F2619EB8F8A341A@PAXPR07MB7984.eurprd07.prod.outlook.com>
On Tue, 1 Jul 2025 05:41:53 +0000 Chia-Yu Chang (Nokia) wrote:
> > > I don't see we access the same atomic variable multiple times in a
> > > single expression, the 2 WRITE_ONCE() are in different expressions.
> > >
> > > And, in the last WRITE_ONCE(), what we access are local variables:
> > > "step_pkt" "step_th", will it create problem?
> >
> > Not really a problem, but what I'm saying is that I don't understand why all the writes are sprinkled with WRITE_ONCE(). You take
> >
> > sch_tree_lock(sch);
> >
> > to block data path and the control path is under rtnl_lock. So why the WRITE_ONCE()? WRITE_ONCE() is used to annotate writes which can be read concurrently without holding relevant locks.
>
> This follows series https://lore.kernel.org/netdev/20240415132054.3822230-1-edumazet@google.com/ to use READ_ONCE in dual2_dump() and WRITE_ONCE in dualpi2_change.
>
> And because of one previous chnage request (https://lore.kernel.org/all/26f2f366-aa14-4879-978a-58d46f9d83a4@redhat.com/) to split single dualpi2.c into 3 patches, so you can find them in the 2nd patch of this series.
>
> What I can do is either move these WRITE_ONCE also to the next patch or merge these patches.
>
> I would prefer the first approach to make it still 3 patches, any other suggestion?
I see. With the change to use two separate fields for packets and time
I think this should be fine. We will hopefully report one or the other,
but not one misinterpreted as the other.
next prev parent reply other threads:[~2025-07-01 23:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-21 19:33 [PATCH v20 net-next 0/6] DUALPI2 patch chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 1/6] sched: Struct definition and parsing of dualpi2 qdisc chia-yu.chang
2025-06-24 11:01 ` Paolo Abeni
2025-06-27 23:25 ` Jakub Kicinski
2025-06-29 22:49 ` Chia-Yu Chang (Nokia)
2025-06-30 15:13 ` Jakub Kicinski
2025-06-30 15:51 ` Chia-Yu Chang (Nokia)
2025-06-30 16:23 ` Jakub Kicinski
2025-06-30 17:04 ` Chia-Yu Chang (Nokia)
2025-06-30 23:43 ` Jakub Kicinski
2025-07-01 5:41 ` Chia-Yu Chang (Nokia)
2025-07-01 23:30 ` Jakub Kicinski [this message]
2025-06-21 19:33 ` [PATCH v20 net-next 2/6] sched: Dump configuration and statistics " chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 3/6] sched: Add enqueue/dequeue " chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 4/6] selftests/tc-testing: Fix warning and style check on tdc.sh chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 5/6] selftests/tc-testing: Add selftests for qdisc DualPI2 chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 6/6] Documentation: netlink: specs: tc: Add DualPI2 specification chia-yu.chang
2025-06-27 23:19 ` Jakub Kicinski
2025-06-29 22:32 ` Chia-Yu Chang (Nokia)
2025-06-30 15:12 ` Jakub Kicinski
2025-06-30 15:27 ` Chia-Yu Chang (Nokia)
2025-06-30 16:23 ` Jakub Kicinski
2025-06-24 11:08 ` [PATCH v20 net-next 0/6] DUALPI2 patch Paolo Abeni
2025-06-24 12:34 ` Ferenc Fejes
2025-06-24 13:53 ` Koen De Schepper (Nokia)
2025-06-25 10:10 ` Simon Horman
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=20250701163053.22113645@kernel.org \
--to=kuba@kernel.org \
--cc=Jason_Livingood@comcast.com \
--cc=alok.a.tiwari@oracle.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@fiberby.net \
--cc=cheshire@apple.com \
--cc=chia-yu.chang@nokia-bell-labs.com \
--cc=dave.taht@gmail.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=g.white@cablelabs.com \
--cc=horms@kernel.org \
--cc=ij@kernel.org \
--cc=ingemar.s.johansson@ericsson.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=koen.de_schepper@nokia-bell-labs.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=mirja.kuehlewind@ericsson.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pctammela@mojatatu.com \
--cc=rs.ietf@gmx.at \
--cc=shuah@kernel.org \
--cc=stephen@networkplumber.org \
--cc=vidhi_goel@apple.com \
--cc=xandfury@gmail.com \
--cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.