]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - fs/f2fs/f2fs.h
f2fs: let fstrim issue discard commands in lower priority
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 24 May 2018 20:57:26 +0000 (13:57 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 29 May 2018 19:04:08 +0000 (12:04 -0700)
commit9a997188ff7ab2110c6fefa85977d1aa8005ae77
treecc28200bbce5692b39db39468fb504658a522d72
parent5b19d284f5195a925dd015a6397bfce184097378
f2fs: let fstrim issue discard commands in lower priority

The fstrim gathers huge number of large discard commands, and tries to issue
without IO awareness, which results in long user-perceive IO latencies on
READ, WRITE, and FLUSH in UFS. We've observed some of commands take several
seconds due to long discard latency.

This patch limits the maximum size to 2MB per candidate, and check IO congestion
when issuing them to disk.

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