f2fs: fix unnecessary periodic wakeup of discard thread when dev is busy
authorSahitya Tummala <stummala@codeaurora.org>
Fri, 31 Aug 2018 09:39:26 +0000 (15:09 +0530)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 5 Sep 2018 20:40:32 +0000 (13:40 -0700)
commitabde73c718293b83c23b2ca137f18b3f8650a553
tree9358559994212007110075309d3c3c45aae0d782
parent7d20c8abb2edcf962ca857d51f4d0f9cd4b19053
f2fs: fix unnecessary periodic wakeup of discard thread when dev is busy

When dev is busy, discard thread wake up timeout can be aligned with the
exact time that it needs to wait for dev to come out of busy. This helps
to avoid unnecessary periodic wakeups and thus save some power.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c