From: Saeed Mahameed <saeedm@mellanox.com>
To: "hslester96@gmail.com" <hslester96@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
Tariq Toukan <tariqt@mellanox.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] net/mlx4_core: Use refcount_t for refcount
Date: Fri, 2 Aug 2019 18:38:12 +0000 [thread overview]
Message-ID: <47bb83d0111f1132bbf532c16be483c5efbe839f.camel@mellanox.com> (raw)
In-Reply-To: <CANhBUQ1chO0Q6wHJwbKMvp6LkD7qLBRw57xwf1QkBAKaewHs5w@mail.gmail.com>
On Sat, 2019-08-03 at 00:10 +0800, Chuhong Yuan wrote:
> Chuhong Yuan <hslester96@gmail.com> 于2019年8月2日周五 下午8:10写道:
> > refcount_t is better for reference counters since its
> > implementation can prevent overflows.
> > So convert atomic_t ref counters to refcount_t.
> >
> > Also convert refcount from 0-based to 1-based.
> >
>
> It seems that directly converting refcount from 0-based
> to 1-based is infeasible.
> I am sorry for this mistake.
Just curious, why not keep it 0 based and use refcout_t ?
refcount API should have the same semantics as atomic_t API .. no ?
next prev parent reply other threads:[~2019-08-02 18:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-02 12:10 Chuhong Yuan
2019-08-02 16:10 ` Chuhong Yuan
2019-08-02 18:38 ` Saeed Mahameed [this message]
2019-08-03 2:42 ` Chuhong Yuan
2019-08-06 18:36 ` Jason Gunthorpe
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=47bb83d0111f1132bbf532c16be483c5efbe839f.camel@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=hslester96@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.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
all inboxes | Powered by JetHome®