From 782f569774d7000e54ae9d680b0e4cd29b1c7ca3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 7 May 2018 10:03:23 -0600 Subject: blk-wbt: throttle discards like background writes Throttle discards like we would any background write. Discards should be background activity, so if they are impacting foreground IO, then we will throttle them down. Reviewed-by: Darrick J. Wong Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe --- block/blk-wbt.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'block/blk-wbt.h') diff --git a/block/blk-wbt.h b/block/blk-wbt.h index 8038b4a0d4efc..d6a125e49db57 100644 --- a/block/blk-wbt.h +++ b/block/blk-wbt.h @@ -14,13 +14,15 @@ enum wbt_flags { WBT_TRACKED = 1, /* write, tracked for throttling */ WBT_READ = 2, /* read */ WBT_KSWAPD = 4, /* write, from kswapd */ + WBT_DISCARD = 8, /* discard */ - WBT_NR_BITS = 3, /* number of bits */ + WBT_NR_BITS = 4, /* number of bits */ }; enum { WBT_RWQ_BG = 0, WBT_RWQ_KSWAPD, + WBT_RWQ_DISCARD, WBT_NUM_RWQ, }; -- cgit v1.2.3