mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 01:34:00 +08:00
f2fs: don't wake up too frequently, if there is lots of IOs
Otherwise, it wakes up discard thread which will sleep again by busy IOs in a loop. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
b86232536c
commit
b460866d27
@ -865,7 +865,7 @@ static inline void wake_up_discard_thread(struct f2fs_sb_info *sbi, bool force)
|
||||
}
|
||||
}
|
||||
mutex_unlock(&dcc->cmd_lock);
|
||||
if (!wakeup)
|
||||
if (!wakeup || !is_idle(sbi, DISCARD_TIME))
|
||||
return;
|
||||
wake_up:
|
||||
dcc->discard_wake = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user