From: Marek Vasut Date: Wed, 8 Aug 2018 11:20:29 +0000 (+0200) Subject: blk: Increase cache element size X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=2e89bbefdc9c1d2ec03e2a5320a56fb1129da916;p=u-boot.git blk: Increase cache element size Cache up to 4 kiB entries. 4 kiB is the default block size on ext4, yet the underlying block layer devices usually report support for 512B . In most cases, the 512B support is emulated (ie. SD cards, SSDs, USB sticks etc.) and the real block size of those devices is much bigger. To avoid performance degradation with such devices and FS setup, bump the maximum cache entry size to 4 kiB. Signed-off-by: Marek Vasut Cc: Tom Rini Cc: Simon Glass Reviewed-by: Tom Rini --- diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c index 294511fcdb..1fa64989d3 100644 --- a/drivers/block/blkcache.c +++ b/drivers/block/blkcache.c @@ -24,7 +24,7 @@ struct block_cache_node { static LIST_HEAD(block_cache); static struct block_cache_stats _stats = { - .max_blocks_per_entry = 2, + .max_blocks_per_entry = 8, .max_entries = 32 };