summaryrefslogtreecommitdiff
path: root/block/blk-wbt.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-05-07 10:03:23 -0600
committerJens Axboe <axboe@kernel.dk>2018-05-08 15:11:02 -0600
commit782f569774d7000e54ae9d680b0e4cd29b1c7ca3 (patch)
tree137bb8ebd2903af1d82fb9159ccc5a06b9005335 /block/blk-wbt.h
parent8bea60901974ad44b06b08d52e1dd421ea8c6e9c (diff)
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 <darrick.wong@oracle.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-wbt.h')
-rw-r--r--block/blk-wbt.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-wbt.h b/block/blk-wbt.h
index 8038b4a0d4ef..d6a125e49db5 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,
};