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

Adam Ford aford173 at gmail.com
Fri Jun 8 15:30:36 UTC 2018


On Tue, May 22, 2018 at 11:24 AM Tom Rini <trini at konsulko.com> wrote:
>
> 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.  The code paths are valid in other cases when we have BLK
> set and may provide wins in raw reads in some use cases, so have this be
> default when BLK is enabled.
>
Tony,

This breaks the AM3517 EVM. It appears to cause issues in MLO which
may not have enough RAM to cache, but I can fix it by disabling
BLOCK_CACHE.
I can submit a patch to disable it on the AM3517, but I am wondering
if something can/should be done to disable it or optionally disable it
in SPL so it's still
available in U-Boot.  I can confirm that when disabled in SPL only, it works.

Any opinions on this?

adam


> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Changes in v2:
> - Make this default y, unconditionally but depend on BLK which is
>   required for the functionality to be used.
> ---
>  drivers/block/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
> index 15fd1bcb2b7e..0792373cfc48 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
>         help
>           This option enables a disk-block cache for all block devices.
>           This is most useful when accessing filesystems under U-Boot since
> --
> 2.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list