]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
nvme-pci: use appropriate initial chunk size for HMB allocation
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 6 Sep 2017 10:15:31 +0000 (12:15 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Oct 2017 21:19:59 +0000 (16:19 -0500)
commit68c94a830a17c6f31631d419e7a79f30292b51d2
treef499fc27cfd425ade4a16ec1a3c0dc8351e68b25
parent7b8075aa648d699389b5eb5094a26bbcec1cf0f2
nvme-pci: use appropriate initial chunk size for HMB allocation

BugLink: http://bugs.launchpad.net/bugs/1721777
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>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/nvme/host/pci.c