Skip to contentSkip to conversation

block: Have BLOCK_CACHE default to y in some cases

PATCH Superseded Tom Rini 1 participant 1 message May 14, 2018 Block layer

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 block: Have BLOCK_CACHE default to y in some cases

When dealing with filesystems that come from block devices we can get a noticeable performance gain in some use cases from having the block cache enabled. Do so by default for btrfs/ext4/FAT.

---
In general this grows U-Boot itself by ~2KiB and does grow SPL by ~540 bytes when we have it present. This is only seemingly true when we have CONFIG_SPL_BLK and in turn block devices and filesystems. I'm not opposed to introducing CONFIG_SPL_BLOCK_CACHE down the line if needed, but I don't think we need it to start with.

---
 drivers/block/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/block/Kconfig +2 -1
index 15fd1bcb2b7e..a7f4bbfb7bb9 100644
@@ -29,7 +29,8 @@ config SPL_BLK
 
 config BLOCK_CACHE
 	bool "Use block device cache"
-	default n
+	depends on BLK
+	default y if FS_BTRFS || FS_EXT4 || FS_FAT
 	help
 	  This option enables a disk-block cache for all block devices.
 	  This is most useful when accessing filesystems under U-Boot since
Signature · 1 line
2.7.4