diff mbox series

[U-Boot] block: Have BLOCK_CACHE default to y in some cases

Message ID 1526336007-31815-1-git-send-email-trini@konsulko.com
State Superseded
Delegated to: Tom Rini
Headers show
Series [U-Boot] block: Have BLOCK_CACHE default to y in some cases | expand

Commit Message

Tom Rini May 14, 2018, 10:13 p.m. UTC
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.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
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(-)
diff mbox series

Patch

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 15fd1bcb2b7e..a7f4bbfb7bb9 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -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