From: Greg KH <gregkh@linuxfoundation.org>
To: "yekai(A)" <yekai13@huawei.com>
Cc: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
linux-accelerators@lists.ozlabs.org,
linux-kernel@vger.kernel.org, linuxarm@huawei.com,
zhangfei.gao@linaro.org, wangzhou1@hisilicon.com
Subject: Re: [PATCH v2 3/3] crypto: hisilicon/qm - defining the device isolation strategy
Date: Tue, 14 Jun 2022 15:29:00 +0200 [thread overview]
Message-ID: <YqiNHOfXHRtaQyZV@kroah.com> (raw)
In-Reply-To: <b597023a-5569-f4be-1e30-78d0d961dfdc@huawei.com>
On Tue, Jun 14, 2022 at 09:24:08PM +0800, yekai(A) wrote:
> > > struct hisi_qm {
> > > enum qm_hw_ver ver;
> > > enum qm_fun_type fun_type;
> > > @@ -335,6 +341,9 @@ struct hisi_qm {
> > > struct qm_shaper_factor *factor;
> > > u32 mb_qos;
> > > u32 type_rate;
> > > + struct list_head uacce_hw_errs;
> > > + atomic_t uacce_ref; /* reference of the uacce */
> >
> > That is not how reference counts work, sorry. Please use 'struct kref'
> > for a real reference count, never roll your own.
> >
> > thanks,
> >
> > greg k-h
> > .
> >
>
> this atomic_t reference is lightweight than 'struct kref',
It's the same size, why would it be "lighter"? Why do you need it to be
lighter, what performance issue is there with a kref?
> this reference
> means whether the task is running. So would it be better to use atomic_t
> reference?
I do not know, as "running or not running" is a state, not a count or a
reference. why does this have to be atomic at all?
thanks,
greg k-h
next prev parent reply other threads:[~2022-06-14 13:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 12:29 [PATCH v2 0/3] crypto: hisilicon - supports device isolation feature Kai Ye
2022-06-14 12:29 ` [PATCH v2 1/3] uacce: " Kai Ye
2022-06-14 12:42 ` Greg KH
2022-06-15 8:52 ` Jonathan Cameron
2022-06-15 9:06 ` yekai(A)
2022-06-14 12:29 ` [PATCH v2 2/3] Documentation: add a isolation strategy vfs node for uacce Kai Ye
2022-06-14 12:41 ` Greg KH
2022-06-15 8:48 ` Jonathan Cameron
2022-06-15 9:18 ` yekai(A)
2022-06-14 12:29 ` [PATCH v2 3/3] crypto: hisilicon/qm - defining the device isolation strategy Kai Ye
2022-06-14 12:43 ` Greg KH
2022-06-14 13:24 ` yekai(A)
2022-06-14 13:29 ` Greg KH [this message]
2022-06-15 9:10 ` yekai(A)
2022-06-14 14:12 ` Zhangfei Gao
2022-06-15 13:02 ` Jonathan Cameron
2022-06-16 1:33 ` yekai(A)
2022-06-16 13:45 ` Jonathan Cameron
2022-06-17 2:07 ` yekai(A)
2022-06-14 12:29 ` [PATCH 1/3] uacce: supports device isolation feature Kai Ye
2022-06-14 14:14 ` Zhangfei Gao
2022-06-15 1:07 ` yekai(A)
2022-06-14 12:29 ` [PATCH 2/3] Documentation: add a isolation strategy vfs node for uacce Kai Ye
2022-06-14 12:29 ` [PATCH 3/3] crypto: hisilicon/qm - defining the device isolation strategy Kai Ye
-- strict thread matches above, loose matches on Subject: below --
2022-06-14 12:23 [PATCH v2 0/3] crypto: hisilicon - supports device isolation feature Kai Ye
2022-06-14 12:23 ` [PATCH v2 3/3] crypto: hisilicon/qm - defining the device isolation strategy Kai Ye
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=YqiNHOfXHRtaQyZV@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-accelerators@lists.ozlabs.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=wangzhou1@hisilicon.com \
--cc=yekai13@huawei.com \
--cc=zhangfei.gao@linaro.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 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).