netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@dev.mellanox.co.il>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	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:56:25 -0800	[thread overview]
Message-ID: <CALzJLG8miALNwMxf1vFZKEj2WoFdMyZZWMBXdtHYMkvvmgkAzQ@mail.gmail.com> (raw)
In-Reply-To: <CAM_iQpVF-71uQtybZLqLDWZQS=JxjD_23fAjxyfy7oLBzw-BoA@mail.gmail.com>

On Wed, Feb 6, 2019 at 4:53 PM Cong Wang <xiyou.wangcong@gmail.com> wrote:
>
> On Wed, Feb 6, 2019 at 4:28 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
> >
> >
> >
> > 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.
>
> Excellent point.
>
> For the refcnt, I am afraid we still have to hold refcnt for the tasklet,
> mlx5_cq_tasklet_cb. But yeah, should be safe to remove from IRQ
> path.

the tasklet path is for rdma CQs only, netdev cqs handling will be refcnt free.

  reply	other threads:[~2019-02-07  0:56 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
2019-02-07  0:51       ` Saeed Mahameed
2019-02-07  0:53       ` Cong Wang
2019-02-07  0:56         ` Saeed Mahameed [this message]
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=CALzJLG8miALNwMxf1vFZKEj2WoFdMyZZWMBXdtHYMkvvmgkAzQ@mail.gmail.com \
    --to=saeedm@dev.mellanox.co.il \
    --cc=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).