From: <gregkh@linuxfoundation.org>
To: akinobu.mita@gmail.com, gregkh@linuxfoundation.org, hch@lst.de,
keith.busch@intel.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "nvme-pci: use appropriate initial chunk size for HMB allocation" has been added to the 4.13-stable tree
Date: Thu, 28 Sep 2017 15:33:53 +0200 [thread overview]
Message-ID: <15066056338135@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
nvme-pci: use appropriate initial chunk size for HMB allocation
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nvme-pci-use-appropriate-initial-chunk-size-for-hmb-allocation.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 30f92d62e5b41a94de2d0bbd677a6ea2fcfed74f Mon Sep 17 00:00:00 2001
From: Akinobu Mita <akinobu.mita@gmail.com>
Date: Wed, 6 Sep 2017 12:15:31 +0200
Subject: nvme-pci: use appropriate initial chunk size for HMB allocation
From: Akinobu Mita <akinobu.mita@gmail.com>
commit 30f92d62e5b41a94de2d0bbd677a6ea2fcfed74f upstream.
The initial chunk size for host memory buffer allocation is currently
PAGE_SIZE << MAX_ORDER. MAX_ORDER order allocation is usually failed
without CONFIG_DMA_CMA. So the HMB allocation is retried with chunk size
PAGE_SIZE << (MAX_ORDER - 1) in general, but there is no problem if the
retry allocation works correctly.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
[hch: rebased]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/nvme/host/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1677,7 +1677,7 @@ static int nvme_alloc_host_mem(struct nv
u32 chunk_size;
/* start big and work our way down */
- for (chunk_size = min_t(u64, preferred, PAGE_SIZE << MAX_ORDER);
+ for (chunk_size = min_t(u64, preferred, PAGE_SIZE * MAX_ORDER_NR_PAGES);
chunk_size >= PAGE_SIZE * 2;
chunk_size /= 2) {
if (!__nvme_alloc_host_mem(dev, preferred, chunk_size)) {
Patches currently in stable-queue which might be from akinobu.mita@gmail.com are
queue-4.13/nvme-pci-use-appropriate-initial-chunk-size-for-hmb-allocation.patch
queue-4.13/nvme-pci-fix-host-memory-buffer-allocation-fallback.patch
reply other threads:[~2017-09-28 13:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=15066056338135@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=akinobu.mita@gmail.com \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.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 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.