Separated cache_size out into rcache_size/pcache_size/fbuffer_size
A much requested feature, this allows much finer control of how RAM is
allocated for the system.
It was difficult to introduce this in previous versions of littlefs due
to how we steal caches during certain file operations, but now we don't
do that and treat the caches much more transparently.
Managing separate cache sizes does add a bit of code, but this is well
worth the potential for RAM savings due to increased flexibility:
code stack
before: 33656 2632
after: 33714 (+0.2%) 2640 (+0.3%)
Also interesting to note this reduces alignment requirements for the
rcache/pcache, since they don't need to share alignment, and completely
removes any alignment requirement from the file buffers.
This commit is contained in:
@@ -256,8 +256,8 @@ code = '''
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -422,8 +422,8 @@ code = '''
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -658,8 +658,8 @@ code = '''
|
||||
[cases.test_alloc_nospc_files]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
|
||||
+42
-42
@@ -590,22 +590,22 @@ code = '''
|
||||
# try writing larger files
|
||||
#
|
||||
# note:
|
||||
# - at 2*CACHE_SIZE we need a shrub
|
||||
# - at 2*FBUFFER_SIZE we need a shrub
|
||||
# - at BLOCK_SIZE/2 we need a block pointer
|
||||
# - at 2*BLOCK_SIZE we need a btree
|
||||
#
|
||||
[cases.test_files_more]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.CACHE_SIZE = 64
|
||||
defines.FBUFFER_SIZE = 64
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, CFG) => 0;
|
||||
@@ -672,8 +672,8 @@ code = '''
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -764,8 +764,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.DENSITY = 2
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -900,15 +900,15 @@ code = '''
|
||||
[cases.test_files_rm]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.CACHE_SIZE = 64
|
||||
defines.FBUFFER_SIZE = 64
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, CFG) => 0;
|
||||
@@ -967,8 +967,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.REMAINING = [4, 1, 0]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1114,8 +1114,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.DENSITY = 2
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1268,8 +1268,8 @@ code = '''
|
||||
[cases.test_files_mv]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1277,7 +1277,7 @@ defines.SIZE = [
|
||||
]
|
||||
defines.N = [0, 128]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.CACHE_SIZE = 64
|
||||
defines.FBUFFER_SIZE = 64
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, CFG) => 0;
|
||||
@@ -1367,8 +1367,8 @@ code = '''
|
||||
[cases.test_files_mv_replace]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1376,7 +1376,7 @@ defines.SIZE = [
|
||||
]
|
||||
defines.N = [0, 128]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.CACHE_SIZE = 64
|
||||
defines.FBUFFER_SIZE = 64
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, CFG) => 0;
|
||||
@@ -1476,15 +1476,15 @@ code = '''
|
||||
[cases.test_files_mv_noop]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.CACHE_SIZE = 64
|
||||
defines.FBUFFER_SIZE = 64
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, CFG) => 0;
|
||||
@@ -1559,15 +1559,15 @@ code = '''
|
||||
[cases.test_files_mv_not_file]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.CACHE_SIZE = 64
|
||||
defines.FBUFFER_SIZE = 64
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, CFG) => 0;
|
||||
@@ -1653,15 +1653,15 @@ code = '''
|
||||
[cases.test_files_mv_not_dir]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.CACHE_SIZE = 64
|
||||
defines.FBUFFER_SIZE = 64
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, CFG) => 0;
|
||||
@@ -1747,15 +1747,15 @@ code = '''
|
||||
[cases.test_files_mv_not_root]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.CACHE_SIZE = 64
|
||||
defines.FBUFFER_SIZE = 64
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, CFG) => 0;
|
||||
@@ -1830,15 +1830,15 @@ code = '''
|
||||
[cases.test_files_mv_not_noent]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.CACHE_SIZE = 64
|
||||
defines.FBUFFER_SIZE = 64
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, CFG) => 0;
|
||||
@@ -1914,8 +1914,8 @@ code = '''
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2050,8 +2050,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.DENSITY = 2
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2244,8 +2244,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.DENSITY = 2
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
|
||||
+38
-38
@@ -5,8 +5,8 @@ after = ['test_fwrite', 'test_fsync']
|
||||
# Some specific tests
|
||||
[cases.test_forphan_create]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -205,8 +205,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_create_pl]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -282,8 +282,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_create_many_pl]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
]
|
||||
defines.CHUNK = 8
|
||||
defines.N = 128
|
||||
@@ -369,8 +369,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_create_sync_wr]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -559,8 +559,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_create_sync_rw]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -748,8 +748,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_create_desync_wdwr]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1066,8 +1066,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_orphan]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1175,8 +1175,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_orphan_wdwr]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1454,8 +1454,8 @@ code = '''
|
||||
defines.N = 'range(6)'
|
||||
defines.M = 'range(6)'
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2136,8 +2136,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_zombie]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2263,8 +2263,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_zombie_posthumous]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2390,8 +2390,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_zombie_rwrw]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2616,8 +2616,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_zombie_rwrw_posthumous]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2842,8 +2842,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_zombie_zombie_rwrwrw]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -3103,8 +3103,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_zombie_zombie_rwrwrw_posthumous]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -4396,8 +4396,8 @@ code = '''
|
||||
# them here
|
||||
[cases.test_forphan_rename]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -4632,8 +4632,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_rename_postrename]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -4928,8 +4928,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_rename_rwrw]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -5273,8 +5273,8 @@ code = '''
|
||||
|
||||
[cases.test_forphan_rename_rwrw_postrename]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
|
||||
+40
-40
@@ -487,8 +487,8 @@ code = '''
|
||||
[cases.test_fsync_rrrr]
|
||||
defines.R = 4
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -537,8 +537,8 @@ defines.R = 4
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -600,8 +600,8 @@ defines.SYNC = [0, 1, 2]
|
||||
# FLUSH=2 => flush via LFS_O_FLUSH
|
||||
defines.FLUSH = [0, 1, 2]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -690,8 +690,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -791,8 +791,8 @@ defines.SYNC = [0, 1, 2]
|
||||
# FLUSH=2 => flush via LFS_O_FLUSH
|
||||
defines.FLUSH = [0, 1, 2]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -876,8 +876,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -967,8 +967,8 @@ defines.SYNC = [0, 1, 2]
|
||||
# FLUSH=2 => flush via LFS_O_FLUSH
|
||||
defines.FLUSH = [0, 1, 2]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1069,8 +1069,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1181,8 +1181,8 @@ defines.SYNC = [0, 1, 2]
|
||||
# FLUSH=2 => flush via LFS_O_FLUSH
|
||||
defines.FLUSH = [0, 1, 2]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1282,8 +1282,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1394,8 +1394,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 40
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1528,8 +1528,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 40
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2334,8 +2334,8 @@ defines.SYNC = [0, 1, 2]
|
||||
# FLUSH=2 => flush via LFS_O_FLUSH
|
||||
defines.FLUSH = [0, 1, 2]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2429,8 +2429,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2535,8 +2535,8 @@ defines.SYNC = [0, 1, 2]
|
||||
# FLUSH=2 => flush via LFS_O_FLUSH
|
||||
defines.FLUSH = [0, 1, 2]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2622,8 +2622,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2720,8 +2720,8 @@ defines.SYNC = [0, 1, 2]
|
||||
# FLUSH=2 => flush via LFS_O_FLUSH
|
||||
defines.FLUSH = [0, 1, 2]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2830,8 +2830,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2947,8 +2947,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 40
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -3096,8 +3096,8 @@ defines.FLUSH = [0, 1, 2]
|
||||
defines.SEED = 'range(20)'
|
||||
defines.N = 40
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
|
||||
+46
-46
@@ -17,8 +17,8 @@ defines.PROG_SIZE = [1, 16]
|
||||
[cases.test_fwrite_incr]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -116,8 +116,8 @@ code = '''
|
||||
# write strategies
|
||||
[cases.test_fwrite_overwrite]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -294,8 +294,8 @@ code = '''
|
||||
# similar to overwrite files, but without underlying data
|
||||
[cases.test_fwrite_holes]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -476,8 +476,8 @@ code = '''
|
||||
[cases.test_fwrite_truncate]
|
||||
defines.FROM = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -485,8 +485,8 @@ defines.FROM = [
|
||||
]
|
||||
defines.TO = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -589,8 +589,8 @@ code = '''
|
||||
[cases.test_fwrite_truncate_truncate]
|
||||
defines.FROM = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -598,8 +598,8 @@ defines.FROM = [
|
||||
]
|
||||
defines.AND = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -607,8 +607,8 @@ defines.AND = [
|
||||
]
|
||||
defines.TO = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -730,8 +730,8 @@ code = '''
|
||||
[cases.test_fwrite_fruncate]
|
||||
defines.FROM = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -739,8 +739,8 @@ defines.FROM = [
|
||||
]
|
||||
defines.TO = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -847,8 +847,8 @@ code = '''
|
||||
[cases.test_fwrite_fruncate_fruncate]
|
||||
defines.FROM = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -856,8 +856,8 @@ defines.FROM = [
|
||||
]
|
||||
defines.AND = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -865,8 +865,8 @@ defines.AND = [
|
||||
]
|
||||
defines.TO = [
|
||||
'0',
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -995,8 +995,8 @@ code = '''
|
||||
# writing any data structure backwards always reveals issues
|
||||
[cases.test_fwrite_reversed]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1126,8 +1126,8 @@ code = '''
|
||||
# trigger compaction
|
||||
[cases.test_fwrite_overwrite_compaction]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1313,8 +1313,8 @@ code = '''
|
||||
|
||||
[cases.test_fwrite_hole_compaction]
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1506,8 +1506,8 @@ code = '''
|
||||
defines.N = 20
|
||||
defines.SEED = 'range(10)'
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1646,8 +1646,8 @@ code = '''
|
||||
defines.N = 20
|
||||
defines.SEED = 'range(10)'
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1795,8 +1795,8 @@ defines.N = 20
|
||||
defines.SEED = 'range(10)'
|
||||
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1873,8 +1873,8 @@ defines.N = 10
|
||||
defines.SEED = 'range(10)'
|
||||
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2013,8 +2013,8 @@ defines.N = 10
|
||||
defines.SEED = 'range(10)'
|
||||
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2175,8 +2175,8 @@ code = '''
|
||||
[cases.test_fwrite_seek_negative]
|
||||
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2276,8 +2276,8 @@ code = '''
|
||||
defines.N = 20
|
||||
defines.SEED = 'range(10)'
|
||||
defines.SIZE = [
|
||||
'CACHE_SIZE/2',
|
||||
'2*CACHE_SIZE',
|
||||
'FBUFFER_SIZE/2',
|
||||
'2*FBUFFER_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
|
||||
Reference in New Issue
Block a user