• Keith Busch's avatar
    nvme: only use power of two io boundaries · e83d776f
    Keith Busch authored
    The kernel requires a power of two for boundaries because that's the
    only way it can efficiently split commands that cross them. A
    controller, however, may report a non-power of two boundary.
    
    The driver had been rounding the controller's value to one the kernel
    can use, but splitting on the wrong boundary provides no benefit on the
    device side, and incurs additional submission overhead from non-optimal
    splits.
    
    Don't provide any boundary hint if the controller's value can't be used
    and log a warning when first scanning a disk's unreported IO boundary.
    Since the chunk sector logic has grown, move it to a separate function.
    
    Cc: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
    Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
    e83d776f
core.c 121 KB