From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Kanchan Joshi <joshi.k@samsung.com>,
Keith Busch <kbusch@meta.com>,
linux-nvme@lists.infradead.org, hch@lst.de, sagi@grimberg.me
Subject: Re: [PATCHv2] nvme: always initialize known command effects
Date: Mon, 23 Jan 2023 17:38:19 +0100 [thread overview]
Message-ID: <20230123163819.GA8009@lst.de> (raw)
In-Reply-To: <20230123163536.GA7699@lst.de>
On Mon, Jan 23, 2023 at 05:35:36PM +0100, Christoph Hellwig wrote:
> On Mon, Jan 23, 2023 at 09:29:35AM -0700, Keith Busch wrote:
> > On Mon, Jan 23, 2023 at 03:54:31PM +0530, Kanchan Joshi wrote:
> > > On Thu, Jan 19, 2023 at 08:41:28AM -0800, Keith Busch wrote:
> > > > + if (!ctrl->effects) {
> > > > + ctrl->effects = kzalloc(sizeof(*ctrl->effects), GFP_KERNEL);
> > >
> > > ctrl->effects is not getting freed if controller does not support the
> > > commands-supported-and-effects log page?
> >
> > Right. If the controller doesn't support it, the driver will make one up
> > with some sane defaults. The point of this patch is that we don't want
> > to re-construct the defaults for each passthrough command so we need to
> > store the defaults somewhere.
>
> But it never ends up beeing freed even when the controller is torn
> down as it never gets added to ctrl->cels.
And maybe part of that is the weird double storage. Can we do away
with ctrl->effects and head->effects and just do the xarray lookup?
The xarray lookup for our normal case will basically add one more
pointer chase and one more cache line that is read.
next prev parent reply other threads:[~2023-01-23 16:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230119164739epcas5p17673bc9fb1b91d7c85561af220a230eb@epcas5p1.samsung.com>
2023-01-19 16:41 ` [PATCHv2] nvme: always initialize known command effects Keith Busch
2023-01-23 9:21 ` Sagi Grimberg
2023-01-23 10:24 ` Kanchan Joshi
2023-01-23 16:29 ` Keith Busch
2023-01-23 16:35 ` Christoph Hellwig
2023-01-23 16:38 ` Christoph Hellwig [this message]
2023-01-23 17:42 ` Keith Busch
2023-01-23 18:02 ` Christoph Hellwig
2023-01-23 18:53 ` Keith Busch
2023-01-24 21:42 ` Keith Busch
2023-01-23 16:33 ` Keith Busch
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=20230123163819.GA8009@lst.de \
--to=hch@lst.de \
--cc=joshi.k@samsung.com \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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.