All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Ray <vray@kalrayinc.com>
To: linyunsheng <linyunsheng@huawei.com>
Cc: davem <davem@davemloft.net>, 方国炬 <guoju.fgj@alibaba-inc.com>,
	kuba <kuba@kernel.org>, netdev <netdev@vger.kernel.org>,
	"Samuel Jones" <sjones@kalrayinc.com>,
	"vladimir oltean" <vladimir.oltean@nxp.com>,
	"Guoju Fang" <gjfang@linux.alibaba.com>,
	"Remy Gauguey" <rgauguey@kalrayinc.com>,
	"Eric Dumazet" <eric.dumazet@gmail.com>,
	will@kernel.org
Subject: Re: packet stuck in qdisc : patch proposal
Date: Tue, 24 May 2022 10:13:53 +0200 (CEST)	[thread overview]
Message-ID: <1758521608.15136543.1653380033771.JavaMail.zimbra@kalray.eu> (raw)
In-Reply-To: <d374b806-1816-574e-ba8b-a750a848a6b3@huawei.com>

 
> Hi, thanks for the testing and debugging. So the main problem is that
> test_bit() is not an atomic operation, so using smp_mb __*_atomic() is
> not really helping, right?

Yes

> In that case we might only need to change smp_mb__before_atomic() to
> smp_rmb() in qdisc_run_begin(), as we only need to order test_bit()
> after set_bit() and clear_bit(), which is a read/write ordering?

I don't think so : we need to order test_bit() with respect to an earlier enqueue().
So we need a store/load barrier => smp_mb()

> By the way,  Guoju need to ensure ordering between spin_unlock() and
> test_bit() in qdisc_run_end(), which is a write/read ordering, so
> smp_mb() is used.

Agreed

But, for qdisc_run_begin(), I think Eric is right anyway, his fix, using test_and_set_bit() seems much better.
I'm going to try it and will tell you what it gives.

Thanks,

V





  reply	other threads:[~2022-05-24  8:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1862202329.1457162.1643113633513.JavaMail.zimbra@kalray.eu>
     [not found] ` <698739062.1462023.1643115337201.JavaMail.zimbra@kalray.eu>
2022-01-28  2:36   ` packet stuck in qdisc Yunsheng Lin
2022-01-28  8:58     ` Vincent Ray
2022-01-28  9:59       ` Vincent Ray
2022-01-29  6:53         ` Yunsheng Lin
2022-01-31 18:39           ` Vincent Ray
2022-02-07  3:17             ` Yunsheng Lin
2022-03-25  6:16     ` Yunsheng Lin
2022-03-25  8:45       ` Vincent Ray
2022-04-13 13:01         ` Vincent Ray
2022-04-14  3:05           ` Guoju Fang
2022-05-23 13:54             ` packet stuck in qdisc : patch proposal Vincent Ray
2022-05-24  2:55               ` Eric Dumazet
2022-05-24  6:43               ` Yunsheng Lin
2022-05-24  8:13                 ` Vincent Ray [this message]
2022-05-24 17:00                   ` Vincent Ray
2022-05-24 20:17                     ` Eric Dumazet
2022-05-25  9:44                       ` Vincent Ray
2022-05-25 10:45                         ` Yunsheng Lin
2022-05-25 12:40                           ` Guoju Fang
2022-05-25 17:43                             ` Vincent Ray
2022-05-25 17:48                               ` Vincent Ray
2022-05-26  0:17                                 ` Eric Dumazet
2022-05-26  7:01                                   ` [PATCH v2] net: sched: add barrier to fix packet stuck problem for lockless qdisc Guoju Fang
2022-05-27  9:11                                     ` [PATCH v3 net] " Guoju Fang
2022-05-28  0:51                                       ` Yunsheng Lin
2022-05-28 10:16                                         ` [PATCH v4 " Guoju Fang
2022-06-01  4:00                                           ` patchwork-bot+netdevbpf
2022-05-30  9:36                                   ` packet stuck in qdisc : patch proposal Vincent Ray

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=1758521608.15136543.1653380033771.JavaMail.zimbra@kalray.eu \
    --to=vray@kalrayinc.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=gjfang@linux.alibaba.com \
    --cc=guoju.fgj@alibaba-inc.com \
    --cc=kuba@kernel.org \
    --cc=linyunsheng@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=rgauguey@kalrayinc.com \
    --cc=sjones@kalrayinc.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=will@kernel.org \
    /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.