From ceae885f9db9dd10ca0de5219e08dda6a340d945 Mon Sep 17 00:00:00 2001 From: Sathyavathi M Date: Thu, 5 Nov 2015 12:52:28 -0700 Subject: [PATCH] NVMe: Increase the max transfer size when mdts is 0 This patch address the issue when IO with 128KB from FIO is split into two parts, 124KB and 4KB, due to max transfer size(127KB). This degrades the device performance. Signed-off-by: Sathyavathi M Acked-by: Keith Busch Signed-off-by: Jens Axboe (cherry picked from commit b12363d0a5da00c422641f3d926fffb713192ea3) Orabug: 22620486 Signed-off-by: Jason Luo Conflicts: drivers/nvme/host/pci.c --- drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index c56a83f734c48..9eedc257c7a51 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2486,7 +2486,7 @@ static int nvme_dev_add(struct nvme_dev *dev) if (ctrl->mdts) dev->max_hw_sectors = 1 << (ctrl->mdts + shift - 9); else - dev->max_hw_sectors = 512 * 1024 / 512; + dev->max_hw_sectors = UINT_MAX; if ((pdev->vendor == PCI_VENDOR_ID_INTEL) && (pdev->device == 0x0953) && ctrl->vs[3]) { -- 2.49.0