2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 01:04:08 +08:00
linux-next/fs/f2fs
Chao Yu 1dcc336b02 f2fs: enable rb-tree extent cache
This patch enables rb-tree based extent cache in f2fs.

When we mount with "-o extent_cache", f2fs will try to add recently accessed
page-block mappings into rb-tree based extent cache as much as possible, instead
of original one extent info cache.

By this way, f2fs can support more effective cache between dnode page cache and
disk. It will supply high hit ratio in the cache with fewer memory when dnode
page cache are reclaimed in environment of low memory.

Storage: Sandisk sd card 64g
1.append write file (offset: 0, size: 128M);
2.override write file (offset: 2M, size: 1M);
3.override write file (offset: 4M, size: 1M);
...
4.override write file (offset: 48M, size: 1M);
...
5.override write file (offset: 112M, size: 1M);
6.sync
7.echo 3 > /proc/sys/vm/drop_caches
8.read file (size:128M, unit: 4k, count: 32768)
(time dd if=/mnt/f2fs/128m bs=4k count=32768)

Extent Hit Ratio:
		before		patched
Hit Ratio	121 / 1071	1071 / 1071

Performance:
		before		patched
real    	0m37.051s	0m35.556s
user    	0m0.040s	0m0.026s
sys     	0m2.990s	0m2.251s

Memory Cost:
		before		patched
Tree Count:	0		1 (size: 24 bytes)
Node Count:	0		45 (size: 1440 bytes)

v3:
 o retest and given more details of test result.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2015-03-03 09:58:47 -08:00
..
acl.c f2fs: fix a bug of inheriting default ACL from parent 2015-02-11 17:04:36 -08:00
acl.h f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00
checkpoint.c f2fs: use ->writepage in sync_meta_pages 2015-03-03 09:58:44 -08:00
data.c f2fs: enable rb-tree extent cache 2015-03-03 09:58:47 -08:00
debug.c f2fs: avoid variable length array 2015-02-11 17:04:50 -08:00
dir.c f2fs: introduce f2fs_update_dentry to clean up duplicated codes 2015-03-03 09:58:44 -08:00
f2fs.h f2fs: add a mount option for rb-tree extent cache 2015-03-03 09:58:46 -08:00
file.c f2fs: introduce universal lookup/update interface for extent cache 2015-03-03 09:58:46 -08:00
gc.c f2fs: split UMOUNT and FASTBOOT flags 2015-02-11 17:04:41 -08:00
gc.h f2fs: fix sparse warnings 2015-02-11 17:04:49 -08:00
hash.c f2fs: fix wrong casting for dentry name 2014-08-29 00:26:50 -07:00
inline.c f2fs: introduce universal lookup/update interface for extent cache 2015-03-03 09:58:46 -08:00
inode.c f2fs: enable rb-tree extent cache 2015-03-03 09:58:47 -08:00
Kconfig f2fs: add f2fs_io_tracer support 2015-01-09 17:02:24 -08:00
Makefile f2fs: add f2fs_io_tracer support 2015-01-09 17:02:24 -08:00
namei.c f2fs: fix incorrectly stat number of inline data inode 2015-03-03 09:58:45 -08:00
node.c f2fs: add core functions for rb-tree extent cache 2015-03-03 09:58:46 -08:00
node.h f2fs: introduce infra macro and data structure of rb-tree extent cache 2015-03-03 09:58:46 -08:00
recovery.c f2fs: introduce universal lookup/update interface for extent cache 2015-03-03 09:58:46 -08:00
segment.c f2fs: enable rb-tree extent cache 2015-03-03 09:58:47 -08:00
segment.h f2fs: use spinlock for segmap_lock instead of rwlock 2015-02-11 17:04:51 -08:00
super.c f2fs: enable rb-tree extent cache 2015-03-03 09:58:47 -08:00
trace.c f2fs: fix sparse warnings 2015-02-11 17:04:49 -08:00
trace.h f2fs: add f2fs_destroy_trace_ios to free radix tree 2015-01-09 17:02:28 -08:00
xattr.c f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00
xattr.h f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00