]> git.baikalelectronics.ru Git - 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)
committerChristoph Hellwig <hch@lst.de>
Mon, 11 Sep 2017 16:29:38 +0000 (12:29 -0400)
commitb1a70f4c1f400c028490ea02c784d066c1db62af
tree660a37a0ab5e90cda0ed1433570e2ec49a10114c
parentc8c754332b57616d013bf231ef8dece52b99d79d
nvme-pci: use appropriate initial chunk size for HMB allocation

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>
Cc: stable@vger.kernel.org
drivers/nvme/host/pci.c