Skip to content

Commit c61b82c

Browse files
Christoph Hellwigaxboe
authored andcommitted
nvme-pci: fix PRP pool size
All operations are based on the controller, not the host page size. Switch the dma pool to use the controller page size as well to avoid massive overallocations on large page size systems. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Keith Busch <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 7442ddc commit c61b82c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/nvme/host/pci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2460,7 +2460,8 @@ static int nvme_disable_prepare_reset(struct nvme_dev *dev, bool shutdown)
24602460
static int nvme_setup_prp_pools(struct nvme_dev *dev)
24612461
{
24622462
dev->prp_page_pool = dma_pool_create("prp list page", dev->dev,
2463-
PAGE_SIZE, PAGE_SIZE, 0);
2463+
NVME_CTRL_PAGE_SIZE,
2464+
NVME_CTRL_PAGE_SIZE, 0);
24642465
if (!dev->prp_page_pool)
24652466
return -ENOMEM;
24662467

0 commit comments

Comments
 (0)