summaryrefslogtreecommitdiff
path: root/include/linux/overflow.h
diff options
context:
space:
mode:
authorSahitya Tummala <stummala@codeaurora.org>2019-06-06 15:08:13 +0530
committerJaegeuk Kim <jaegeuk@kernel.org>2019-07-12 18:35:03 -0700
commit4b56b2d6d8622743b6ed452a324c95a8e69d5bf8 (patch)
tree4ec68d4d433991a5156498d312ccf44d341d177c /include/linux/overflow.h
parent783ea2b658ff8163a2c3de7817aaf56fcdaf0f08 (diff)
f2fs: fix is_idle() check for discard type
The discard thread should issue upto dpolicy->max_requests at once and wait for all those discard requests at once it reaches dpolicy->max_requests. It should then sleep for dpolicy->min_interval timeout before issuing the next batch of discard requests. But in the current code of is_idle(), it checks for dcc_info->queued_discard and aborts issuing the discard batch of max_requests. This dcc_info->queued_discard will be true always once one discard command is issued. It is thus resulting into this type of discard request pattern - - Issue discard request#1 - is_idle() returns false, discard thread waits for request#1 and then sleeps for min_interval 50ms. - Issue discard request#2 - is_idle() returns false, discard thread waits for request#2 and then sleeps for min_interval 50ms. - and so on for all other discard requests, assuming f2fs is idle w.r.t other conditions. With this fix, the pattern will look like this - - Issue discard request#1 - Issue discard request#2 and so on upto max_requests of 8 - Issue discard request#8 - wait for min_interval 50ms. Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions