]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita6dae93394e66fdeabe54221b3e9c1b5c5be305a
treec44d1ce981f620b454b97b22bf0fca617561ce49
parent8a35e1c0d3c2af67ee8506eb98913146bc873c1a
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