diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-05-07 18:03:23 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-05-08 23:11:02 +0200 |
commit | 782f569774d7000e54ae9d680b0e4cd29b1c7ca3 (patch) | |
tree | 137bb8ebd2903af1d82fb9159ccc5a06b9005335 /block/blk-wbt.h | |
parent | blk-wbt: pass in enum wbt_flags to get_rq_wait() (diff) | |
download | linux-782f569774d7000e54ae9d680b0e4cd29b1c7ca3.tar.xz linux-782f569774d7000e54ae9d680b0e4cd29b1c7ca3.zip |
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.h | 4 |
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, }; |