[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210514163923.53f39888@kicinski-fedora-PC1C0HJN>
Date: Fri, 14 May 2021 16:39:23 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Yunsheng Lin <linyunsheng@...wei.com>,
David Miller <davem@...emloft.net>,
Vladimir Oltean <olteanv@...il.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andriin@...com>,
Eric Dumazet <edumazet@...gle.com>,
Wei Wang <weiwan@...gle.com>,
"Cong Wang ." <cong.wang@...edance.com>,
Taehee Yoo <ap420073@...il.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, linuxarm@...neuler.org,
Marc Kleine-Budde <mkl@...gutronix.de>,
linux-can@...r.kernel.org, Jamal Hadi Salim <jhs@...atatu.com>,
Jiri Pirko <jiri@...nulli.us>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>, kpsingh@...nel.org,
bpf <bpf@...r.kernel.org>, Jonas Bonn <jonas.bonn@...rounds.com>,
Paolo Abeni <pabeni@...hat.com>,
Michael Zhivich <mzhivich@...mai.com>,
Josh Hunt <johunt@...mai.com>, Jike Song <albcamus@...il.com>,
Kehuan Feng <kehuan.feng@...il.com>,
Ahmad Fatoum <a.fatoum@...gutronix.de>, atenart@...nel.org,
Alexander Duyck <alexander.duyck@...il.com>,
Hillf Danton <hdanton@...a.com>, jgross@...e.com,
JKosina@...e.com, Michal Kubecek <mkubecek@...e.cz>,
Björn Töpel <bjorn@...nel.org>,
Alexander Lobakin <alobakin@...me>
Subject: Re: [PATCH net v8 1/3] net: sched: fix packet stuck problem for
lockless qdisc
On Fri, 14 May 2021 16:36:16 -0700 Cong Wang wrote:
> > @@ -176,8 +202,15 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
> > static inline void qdisc_run_end(struct Qdisc *qdisc)
> > {
> > write_seqcount_end(&qdisc->running);
> > - if (qdisc->flags & TCQ_F_NOLOCK)
> > + if (qdisc->flags & TCQ_F_NOLOCK) {
> > spin_unlock(&qdisc->seqlock);
> > +
> > + if (unlikely(test_bit(__QDISC_STATE_MISSED,
> > + &qdisc->state))) {
> > + clear_bit(__QDISC_STATE_MISSED, &qdisc->state);
>
> We have test_and_clear_bit() which is atomic, test_bit()+clear_bit()
> is not.
It doesn't have to be atomic, right? I asked to split the test because
test_and_clear is a locked op on x86, test by itself is not.
Powered by blists - more mailing lists