netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Cong Wang <xiyou.wangcong@gmail.com>,
	Eric Dumazet <eric.dumazet@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Saeed Mahameed <saeedm@mellanox.com>,
	Tariq Toukan <tariqt@mellanox.com>
Subject: Re: [Patch net-next v2] mlx5: use RCU lock in mlx5_eq_cq_get()
Date: Wed, 6 Feb 2019 16:28:25 -0800	[thread overview]
Message-ID: <c35f67d1-0190-cb64-74d9-54889eb1aef7@gmail.com> (raw)
In-Reply-To: <CAM_iQpUy0y_NqT82htx_D-3G-wpo4mfguvxk2SPt4d2+KjXetA@mail.gmail.com>



On 02/06/2019 04:04 PM, Cong Wang wrote:

> synchronize_irq() is called before mlx5_cq_put(), so I don't
> see why readers could get 0 refcnt.

Then the more reasons to get rid of the refcount increment/decrement completely ...

Technically, even the rcu_read_lock() and rcu_read_unlock() are not needed,
since synchronize_irq() is enough.

> 
> For the rds you mentioned, it doesn't wait for readers, this
> is why it needs to check against 0 and why it is different from
> this one.
> 
> Thanks.
> 

  reply	other threads:[~2019-02-07  0:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 23:00 [Patch net-next v2] mlx5: use RCU lock in mlx5_eq_cq_get() Cong Wang
2019-02-06 23:36 ` Eric Dumazet
2019-02-06 23:55   ` Eric Dumazet
2019-02-07  0:04   ` Cong Wang
2019-02-07  0:28     ` Eric Dumazet [this message]
2019-02-07  0:51       ` Saeed Mahameed
2019-02-07  0:53       ` Cong Wang
2019-02-07  0:56         ` Saeed Mahameed
2019-02-11 22:41 ` Saeed Mahameed

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=c35f67d1-0190-cb64-74d9-54889eb1aef7@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=tariqt@mellanox.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 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).