• Max Gurtovoy's avatar
    nvme-rdma: Fix max_hw_sectors calculation · ff13c1b8
    Max Gurtovoy authored
    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: default avatarSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: default avatarMax Gurtovoy <maxg@mellanox.com>
    Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
    ff13c1b8
rdma.c 54.3 KB