]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
scsi: hisi_sas: optimise DMA slot memory
authorXiaofei Tan <tanxiaofei@huawei.com>
Thu, 29 Jun 2017 13:02:14 +0000 (21:02 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 1 Jul 2017 21:06:56 +0000 (17:06 -0400)
commitf557e32c0023ea0d67cdaa81b3398550dc1e4876
treec1bdb3d972b6275cd1fbd6ba1dce1334ebd0171e
parente4a80c31f2e863295cb2351f23ae486b0513a705
scsi: hisi_sas: optimise DMA slot memory

Currently we allocate 3 sets of DMA memories from separate pools for
each slot. This is inefficient in terms of memory usage
(buffers are less than 1 page in size, so we lose due to alignment),
and also time spent in doing 3 allocations + de-allocations per slot,
instead of 1.

To optimise, combine the 3 DMA buffers into a single buffer from a
single pool.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c