summaryrefslogtreecommitdiff
path: root/drivers/block/null_blk/null_blk.h
diff options
context:
space:
mode:
authorMax Gurtovoy <mgurtovoy@nvidia.com>2021-04-12 09:55:23 +0000
committerJens Axboe <axboe@kernel.dk>2021-04-12 06:47:25 -0600
commitcee1b21523495ea3f153442d97d1689a17967648 (patch)
tree26c2c2412799005ffeb2c05bafa762f62c9c0c80 /drivers/block/null_blk/null_blk.h
parenteb87e4e90bca55ab581dcb0bf1be278cd1c27c96 (diff)
null_blk: add option for managing virtual boundary
This will enable changing the virtual boundary of null blk devices. For now, null blk devices didn't have any restriction on the scatter/gather elements received from the block layer. Add a module parameter and a configfs option that will control the virtual boundary. This will enable testing the efficiency of the block layer bounce buffer in case a suitable application will send discontiguous IO to the given device. Initial testing with patched FIO showed the following results (64 jobs, 128 iodepth, 1 nullb device): IO size READ (virt=false) READ (virt=true) Write (virt=false) Write (virt=true) ---------- ------------------- ----------------- ------------------- ------------------- 1k 10.7M 8482k 10.8M 8471k 2k 10.4M 8266k 10.4M 8271k 4k 10.4M 8274k 10.3M 8226k 8k 10.2M 8131k 9800k 7933k 16k 9567k 7764k 8081k 6828k 32k 8865k 7309k 5570k 5153k 64k 7695k 6586k 2682k 2617k 128k 5346k 5489k 1320k 1296k Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Link: https://lore.kernel.org/r/20210412095523.278632-1-mgurtovoy@nvidia.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/null_blk/null_blk.h')
-rw-r--r--drivers/block/null_blk/null_blk.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/null_blk/null_blk.h b/drivers/block/null_blk/null_blk.h
index 83504f3cc9d6..5ad5087ebe39 100644
--- a/drivers/block/null_blk/null_blk.h
+++ b/drivers/block/null_blk/null_blk.h
@@ -96,6 +96,7 @@ struct nullb_device {
bool memory_backed; /* if data is stored in memory */
bool discard; /* if support discard */
bool zoned; /* if device is zoned */
+ bool virt_boundary; /* virtual boundary on/off for the device */
};
struct nullb {