linux-stable/fs/f2fs
Jaegeuk Kim 71644dff48 f2fs: add block_age-based extent cache
This patch introduces a runtime hot/cold data separation method
for f2fs, in order to improve the accuracy for data temperature
classification, reduce the garbage collection overhead after
long-term data updates.

Enhanced hot/cold data separation can record data block update
frequency as "age" of the extent per inode, and take use of the age
info to indicate better temperature type for data block allocation:
 - It records total data blocks allocated since mount;
 - When file extent has been updated, it calculate the count of data
blocks allocated since last update as the age of the extent;
 - Before the data block allocated, it searches for the age info and
chooses the suitable segment for allocation.

Test and result:
 - Prepare: create about 30000 files
  * 3% for cold files (with cold file extension like .apk, from 3M to 10M)
  * 50% for warm files (with random file extension like .FcDxq, from 1K
to 4M)
  * 47% for hot files (with hot file extension like .db, from 1K to 256K)
 - create(5%)/random update(90%)/delete(5%) the files
  * total write amount is about 70G
  * fsync will be called for .db files, and buffered write will be used
for other files

The storage of test device is large enough(128G) so that it will not
switch to SSR mode during the test.

Benefit: dirty segment count increment reduce about 14%
 - before: Dirty +21110
 - after:  Dirty +18286

Signed-off-by: qixiaoyu1 <qixiaoyu1@xiaomi.com>
Signed-off-by: xiongping1 <xiongping1@xiaomi.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2022-12-12 14:53:56 -08:00
..
acl.c f2fs: port to vfs{g,u}id_t and associated helpers 2022-10-04 13:31:43 -07:00
acl.h vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
checkpoint.c f2fs: fix return val in f2fs_start_ckpt_thread() 2022-11-01 17:56:04 -07:00
compress.c f2fs: do some cleanup for f2fs module init 2022-12-08 09:32:20 -08:00
data.c f2fs: refactor extent_cache to support for read and more 2022-12-12 14:53:56 -08:00
debug.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
dir.c f2fs: change type for 'sbi->readdir_ra' 2022-11-28 12:46:33 -08:00
extent_cache.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
f2fs.h f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
file.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
gc.c f2fs: refactor extent_cache to support for read and more 2022-12-12 14:53:56 -08:00
gc.h f2fs: remove redundant code for gc condition 2022-07-30 20:16:20 -07:00
hash.c f2fs: don't use casefolded comparison for "." and ".." 2022-05-17 11:19:23 -07:00
inline.c f2fs: support recording errors into superblock 2022-10-04 13:31:45 -07:00
inode.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
iostat.c f2fs: iostat: support accounting compressed IO 2022-08-29 21:15:51 -07:00
iostat.h f2fs: iostat: support accounting compressed IO 2022-08-29 21:15:51 -07:00
Kconfig f2fs: introduce F2FS_UNFAIR_RWSEM to support unfair rwsem 2022-03-04 09:15:53 -08:00
Makefile f2fs: separate out iostat feature 2021-08-23 10:25:51 -07:00
namei.c f2fs: allocate the extent_cache by default 2022-12-12 14:53:56 -08:00
node.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
node.h f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
recovery.c f2fs: do some cleanup for f2fs module init 2022-12-08 09:32:20 -08:00
segment.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
segment.h f2fs: remove struct segment_allocation default_salloc_ops 2022-12-08 09:32:10 -08:00
shrinker.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
super.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
sysfs.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
verity.c - Alistair Popple has a series which addresses a race which causes page 2022-10-14 12:28:43 -07:00
xattr.c f2fs: support recording errors into superblock 2022-10-04 13:31:45 -07:00
xattr.h