nvme-rdma: Fix max_hw_sectors calculation
authorMax Gurtovoy <maxg@mellanox.com>
Sat, 21 Sep 2019 20:58:19 +0000 (23:58 +0300)
committerSagi Grimberg <sagi@grimberg.me>
Wed, 25 Sep 2019 19:53:14 +0000 (12:53 -0700)
commitff13c1b87c97275b82b2af99044b4abf6861b28f
treec44d1ce981f620b454b97b22bf0fca617561ce49
parentbc4f6e06a90ea016855fc67212b4d500145f0b8a
nvme-rdma: Fix max_hw_sectors calculation

By default, the NVMe/RDMA driver should support max io_size of 1MiB (or
upto the maximum supported size by the HCA). Currently, one will see that
/sys/class/block/<bdev>/queue/max_hw_sectors_kb is 1020 instead of 1024.

A non power of 2 value can cause performance degradation due to
unnecessary splitting of IO requests and unoptimized allocation units.

The number of pages per MR has been fixed here, so there is no longer any
need to reduce max_sectors by 1.

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/rdma.c