-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance #977
Open
matthieu-c-tagheuer
wants to merge
4
commits into
littlefs-project:master
Choose a base branch
from
matthieu-c-tagheuer:performance
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Performance #977
matthieu-c-tagheuer
wants to merge
4
commits into
littlefs-project:master
from
matthieu-c-tagheuer:performance
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matthieu-c-tagheuer
force-pushed
the
performance
branch
from
April 30, 2024 14:15
797f3e2
to
0f03b3f
Compare
matthieu-c-tagheuer
force-pushed
the
performance
branch
5 times, most recently
from
May 2, 2024 07:10
80ae688
to
919a019
Compare
Tests passed ✓, Code: 17072 B (+0.0%), Stack: 1440 B (+0.0%), Structs: 812 B (+0.0%)
|
matthieu-c-tagheuer
force-pushed
the
performance
branch
from
May 2, 2024 07:33
919a019
to
07a6d5b
Compare
Can be enabled with LFS_CACHE_TRACE it will output information with LFS_DEBUG
cache trace show lots of possible caching in lfs_dir_traverse cache recache for block 835 number 4938 line=1683 cache recache for block 882 number 4938 line=1683 cache recache for block 930 number 4938 line=1683 cache recache for block 978 number 4938 line=1683 test config .read_size = 4, .prog_size = 16, .block_size = 4096, .block_count = (8*1024), .cache_size = 1024, .metadata_max = 1024, for (int i = 0; i <= 1000; i++) { char test_path[32]; if (i > 100) { sprintf(test_path, "testdir/test%d", i-100); err = lfs_remove(&lfs, test_path); } sprintf(test_path, "testdir/test%d", i); uint32_t prng = i; lfs_size_t size = 4096 + (test_prng(&prng) & 3); lfs_file_t file; err = lfs_file_open(&lfs, &file, test_path, LFS_O_WRONLY | LFS_O_CREAT | LFS_O_TRUNC); lfs_ssize_t res = lfs_file_write(&lfs, &file, chunk, size); err = lfs_file_close(&lfs, &file); } before patch top read operation (number of flash read size, number of flash op) 106060, 16976, 106060, 16976, 106560, 19645, 107084, 16977, 108820, 17624, total read/write total read=26174188 B write=4287328 B total num read=1445383 op write=7732 op after patch 15044, 41 15044, 41 15044, 41 15044, 41 16068, 42, total read=18809040 B write=4287328 B total num read=49477 op write=7732 op
cache trace show possible caching in lfs_dir_getslice cache recache for block 83 number 23 line=790 cache recache for block 881 number 23 line=790 cache recache for block 929 number 23 line=790 cache recache for block 977 number 23 line=790 cache recache for block 128 number 24 line=790 For the same test than previous patch before patch top read operation (number of flash read size, number of flash op) 15044, 41 15044, 41 15044, 41 15044, 41 16068, 42 total read/write total read=18809040 B write=4287328 B total num read=49477 op write=7732 op after patch top read operation (number of flash read size, number of flash op) 15044, 41 15044, 41 15044, 41 15044, 41 16068, 42 total read/write total read=18852728 B write=4287328 B total num read=45678 op write=7732 op cache recache for block 882 number 2 line=998 cache recache for block 911 number 2 line=998 cache recache for block 930 number 2 line=998 cache recache for block 959 number 2 line=998 cache recache for block 978 number 2 line=998
matthieu-c-tagheuer
force-pushed
the
performance
branch
from
May 2, 2024 07:34
07a6d5b
to
9270114
Compare
Tests passed ✓, Code: 17256 B (+1.1%), Stack: 1480 B (+2.8%), Structs: 812 B (+0.0%)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.