Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b7eff58 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

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: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 78a402a2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -865,7 +865,7 @@ static inline void wake_up_discard_thread(struct f2fs_sb_info *sbi, bool force)
		}
		}
	}
	}
	mutex_unlock(&dcc->cmd_lock);
	mutex_unlock(&dcc->cmd_lock);
	if (!wakeup)
	if (!wakeup || !is_idle(sbi, DISCARD_TIME))
		return;
		return;
wake_up:
wake_up:
	dcc->discard_wake = 1;
	dcc->discard_wake = 1;