From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: kbusch@kernel.org, hch@lst.de, linux-nvme@lists.infradead.org,
sagi@grimberg.me
Subject: Re: [PATCH RFC] nvme-pci: remove the unsed code in alloc_size
Date: Tue, 7 Jul 2020 10:46:59 +0200 [thread overview]
Message-ID: <20200707084659.GA26962@lst.de> (raw)
In-Reply-To: <20200706225305.14892-1-chaitanya.kulkarni@wdc.com>
On Mon, Jul 06, 2020 at 03:53:05PM -0700, Chaitanya Kulkarni wrote:
> >From the initial implementation of NVMe SGL kernel support
> commit a7a7cbe353a5 ("nvme-pci: add SGL support") with addition of the
> commit 943e942e6266 ("nvme-pci: limit max IO size and segments to avoid
> high order allocations") now there is only caller left for
> nvme_pci_iod_alloc_size() which statically passes true for last
> parameter that calculates allocation size based on SGL since we need
> size of biggest command supported for mempool allocation.
>
> This patch removes the helper functions nvme_pci_iod_alloc_size() and
> nvme_npages() used for allocation size calculation and open codes it
> into nvme_probe().
This is an obviously correct transformation, but I think the existing
code is a land mine. I think we should change it to use the maximum
of either the PRP or SGL case to gurantee that we are on the safe
side. Can you do that instead?
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-07-07 8:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 22:53 [PATCH RFC] nvme-pci: remove the unsed code in alloc_size Chaitanya Kulkarni
2020-07-07 8:46 ` Christoph Hellwig [this message]
2020-07-07 15:53 ` Chaitanya Kulkarni
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=20200707084659.GA26962@lst.de \
--to=hch@lst.de \
--cc=chaitanya.kulkarni@wdc.com \
--cc=kbusch@kernel.org \
--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.