]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: avoid high cpu usage in discard thread
authorChao Yu <yuchao0@huawei.com>
Mon, 8 Jan 2018 10:48:33 +0000 (18:48 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 16 Jan 2018 23:40:00 +0000 (15:40 -0800)
commit0635d985df44cc4fc3df250a5026f0f1234ff7ba
tree73ff723b4158094dcab5c70403fa83411dab9977
parent05b62f44920f04b49404770fd01cdc268f402915
f2fs: avoid high cpu usage in discard thread

We take very long time to finish generic/476, this is because we will
check consistence of all discard entries in global rb tree while
traversing all different granularity pending lists, even when the list
is empty, in order to avoid that unneeded overhead, we have to skip
the check when coming up an empty list.

generic/476 time consumption:
cost
Before patch & w/o consistence check 57s
Before patch & w/ consistence check 1426s
After patch 78s

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