OSDN Git Service

scsi: storvsc: Enable scatterlist entry lengths > 4Kbytes
authorMichael Kelley <mikelley@microsoft.com>
Tue, 23 Feb 2021 22:44:54 +0000 (14:44 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 17 Mar 2021 04:04:40 +0000 (00:04 -0400)
commit3d9c3dcc58e968403f29767726407bc680e087b5
tree5fb4eeaecd3eeb00281c0037eb07bfbbcef805ec
parent471ee95ccca9c417344453f73a39681cfde39af1
scsi: storvsc: Enable scatterlist entry lengths > 4Kbytes

storvsc currently sets .dma_boundary to limit scatterlist entries to 4
Kbytes, which is less efficient with huge pages that offer large chunks of
contiguous physical memory. Improve the algorithm for creating the Hyper-V
guest physical address PFN array so that scatterlist entries with lengths >
4Kbytes are handled.  As a result, remove the .dma_boundary setting.

The improved algorithm also adds support for scatterlist entries with
offsets >= 4Kbytes, which is supported by many other SCSI low-level
drivers.  And it retains support for architectures where possibly PAGE_SIZE
!= HV_HYP_PAGE_SIZE (such as ARM64).

Link: https://lore.kernel.org/r/1614120294-1930-1-git-send-email-mikelley@microsoft.com
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/storvsc_drv.c
include/linux/hyperv.h