zephyr/tests/subsys/fs
Damian Krolik 49fb5f0a1a nvs: replace CRC with better hash function for lookup cache
NVS lookup cache currently uses CRC8/16 as a hash function
to determine the cache position, which is not ideal choice.
For example, when NVS lookup cache size is 512 and 256
subsequent NVS IDs are written (that is, 0, 1.., 255), this
results in 128 cache collisions.

It is better to use a dedicated integer hash function. This
PR uses one of the 16-bit integer hash functions discovered
with https://github.com/skeeto/hash-prospector project. The
hash function was additionally tested in the context of NVS
lookup cache using simple NVS ID allocation patterns as well
as using real device NVS dump.

Also, add a test case to verify that the hash function is
not extremely bad.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2023-09-04 18:21:20 +02:00
..
common tests: fs: Make common fs_basic test 2023-08-03 12:22:01 -04:00
ext2 tests: fs: ext2: Add ext specific tests 2023-08-03 12:22:01 -04:00
fat_fs_api tests: fs: add more tags 2023-08-24 13:41:26 -04:00
fat_fs_dual_drive samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
fcb tests: enable flash tests for mr_canhubk3 board 2023-07-26 09:44:14 +02:00
fs_api tests: use integration_platforms where applicable 2023-05-26 17:52:02 -04:00
littlefs fs: littlefs: add alignment arg to FS_LITTLEFS_DECLARE_CUSTOM_CONFIG macro 2023-09-01 17:44:15 +02:00
multi-fs samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
nvs nvs: replace CRC with better hash function for lookup cache 2023-09-04 18:21:20 +02:00