1
0
Fork 0
remarkable-uboot/disk
Eric Nelson e40cf34a29 drivers: block: add block device cache
Add a block device cache to speed up repeated reads of block devices by
various filesystems.

This small amount of cache can dramatically speed up filesystem
operations by skipping repeated reads of common areas of a block
device (typically directory structures).

This has shown to have some benefit on FAT filesystem operations of
loading a kernel and RAM disk, but more dramatic benefits on ext4
filesystems when the kernel and/or RAM disk are spread across
multiple extent header structures as described in commit fc0fc50.

The cache is implemented through a minimal list (block_cache) maintained
in most-recently-used order and count of the current number of entries
(cache_count). It uses a maximum block count setting to prevent copies
of large block reads and an upper bound on the number of cached areas.

The maximum number of entries in the cache defaults to 32 and the maximum
number of blocks per cache entry has a default of 2, which has shown to
produce the best results on testing of ext4 and FAT filesystems.

The 'blkcache' command (enabled through CONFIG_CMD_BLOCK_CACHE) allows
changing these values and can be used to tune for a particular filesystem
layout.

Signed-off-by: Eric Nelson <eric@nelint.com>
2016-04-01 17:18:27 -04:00
..
Makefile kbuild: use Linux Kernel build scripts 2014-02-19 11:07:50 -05:00
part.c drivers: block: add block device cache 2016-04-01 17:18:27 -04:00
part_amiga.c part: Rename test_part_xx() and print_part_xx() 2016-03-14 15:34:50 -06:00
part_amiga.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
part_dos.c part: Rename test_part_xx() and print_part_xx() 2016-03-14 15:34:50 -06:00
part_dos.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
part_efi.c part_efi: Drop NULL check in part_get_info_efi() 2016-03-22 12:16:19 -04:00
part_iso.c part_iso: Drop the customer unaligned access functions 2016-03-22 12:16:18 -04:00
part_iso.h Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
part_mac.c part: Rename test_part_xx() and print_part_xx() 2016-03-14 15:34:50 -06:00
part_mac.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00