summaryrefslogtreecommitdiffstats
path: root/drivers/ptp
diff options
context:
space:
mode:
authorGioh Kim <gi-oh.kim@cloud.ionos.com>2020-12-10 11:18:25 +0100
committerJens Axboe <axboe@kernel.dk>2020-12-16 22:56:03 +0100
commit5a1328d0c3a757cdd8c65f4dfe0a02502a5810bc (patch)
tree7e268b3e7359720ddd1e08adcd159df922661479 /drivers/ptp
parentblock/rnbd: Set write-back cache and fua same to the target device (diff)
downloadlinux-5a1328d0c3a757cdd8c65f4dfe0a02502a5810bc.tar.xz
linux-5a1328d0c3a757cdd8c65f4dfe0a02502a5810bc.zip
block/rnbd-clt: Dynamically allocate sglist for rnbd_iu
The BMAX_SEGMENT static array for scatterlist is embedded in rnbd_iu structure to avoid memory allocation in hot IO path. In many cases, we do need only several sg entries because many IOs have only several segments. This patch change rnbd_iu to check the number of segments in the request and allocate sglist dynamically. For io path, use sg_alloc_table_chained to allocate sg list faster. First it makes two sg entries after pdu of request. The sg_alloc_table_chained uses the pre-allocated sg entries if the number of segments of the request is less than two. So it reduces the number of memory allocation. Signed-off-by: Gioh Kim <gi-oh.kim@cloud.ionos.com> Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ptp')
0 files changed, 0 insertions, 0 deletions