From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC V2 PATCH 0/3] Add cache for block devices
Date: Mon, 21 Mar 2016 02:59:57 +0100 [thread overview]
Message-ID: <56EF559D.3040608@denx.de> (raw)
In-Reply-To: <1458524727-4643-1-git-send-email-eric@nelint.com>
On 03/21/2016 02:45 AM, Eric Nelson wrote:
> Here's a more full-featured implementation of a cache for block devices
> that uses a small linked list of cache blocks.
Why do you use linked list ? You have four entries, you can as well use
fixed array. Maybe you should implement an adaptive cache would would
use the unpopulated malloc area and hash the sector number(s) into that
area ?
> Experimentation loading a 4.5 MiB kernel from the root directory of
> a FAT filesystem shows that a single cache entry of a single block
> is the only
only ... what ? This is where things started to be interesting, but you
leave us hanging :)
> Loading the same from the /boot directory of an ext4 filesystem
> shows a benefit with 4 cache entries, though the single biggest
> benefit is also with the first cache entry:
>
> => for n in 0 1 2 4 8 ; do
>> blkc 1 $n ; blkc c ; blkc i ;
>> load mmc 0:2 10008000 /boot/zImage ;
>> done
> changed to max of 0 entries of 1 blocks each
> 4955304 bytes read in 503 ms (9.4 MiB/s)
> changed to max of 1 entries of 1 blocks each
> 4955304 bytes read in 284 ms (16.6 MiB/s)
> changed to max of 2 entries of 1 blocks each
> 4955304 bytes read in 284 ms (16.6 MiB/s)
> changed to max of 4 entries of 1 blocks each
> 4955304 bytes read in 255 ms (18.5 MiB/s)
> changed to max of 8 entries of 1 blocks each
> 4955304 bytes read in 255 ms (18.5 MiB/s)
>
> As mentioned earlier in this thread, the modification to the mmc
> layer should probably be simpler and easier to apply to other
> block subsystems.
>
> Eric Nelson (3):
> drivers: block: add block device cache
> block: add Kconfig options for BLOCK_CACHE, CMD_BLOCK_CACHE
> mmc: add support for block device cache
>
> drivers/block/Kconfig | 19 ++++
> drivers/block/Makefile | 1 +
> drivers/block/cache_block.c | 240 ++++++++++++++++++++++++++++++++++++++++++++
> drivers/mmc/mmc.c | 10 +-
> drivers/mmc/mmc_write.c | 7 ++
> include/part.h | 69 +++++++++++++
> 6 files changed, 345 insertions(+), 1 deletion(-)
> create mode 100644 drivers/block/cache_block.c
>
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2016-03-21 1:59 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 1:45 [U-Boot] [RFC V2 PATCH 0/3] Add cache for block devices Eric Nelson
2016-03-21 1:45 ` [U-Boot] [RFC V2 PATCH 1/3] drivers: block: add block device cache Eric Nelson
2016-03-21 17:59 ` Eric Nelson
2016-03-23 17:22 ` Stephen Warren
2016-03-23 17:43 ` Eric Nelson
2016-03-21 1:45 ` [U-Boot] [RFC V2 PATCH 2/3] block: add Kconfig options for [CMD_]BLOCK_CACHE Eric Nelson
2016-03-23 17:24 ` Stephen Warren
2016-03-23 17:45 ` Eric Nelson
2016-03-21 1:45 ` [U-Boot] [RFC V2 PATCH 3/3] mmc: add support for block device cache Eric Nelson
2016-03-23 17:27 ` Stephen Warren
2016-03-23 17:46 ` Eric Nelson
2016-03-21 1:59 ` Marek Vasut [this message]
2016-03-21 13:48 ` [U-Boot] [RFC V2 PATCH 0/3] Add cache for block devices Eric Nelson
2016-03-21 16:49 ` Marek Vasut
2016-03-21 17:56 ` Eric Nelson
2016-03-21 18:54 ` Marek Vasut
2016-03-27 19:00 ` [U-Boot] [PATCH " Eric Nelson
2016-03-27 19:00 ` [U-Boot] [PATCH 1/3] drivers: block: add block device cache Eric Nelson
2016-03-28 14:16 ` Tom Rini
2016-03-28 14:33 ` Eric Nelson
2016-03-28 16:24 ` [U-Boot] [PATCH V2 " Eric Nelson
2016-03-28 17:05 ` [U-Boot] [PATCH V3 " Eric Nelson
2016-03-30 14:36 ` Stephen Warren
2016-03-30 15:19 ` Tom Rini
2016-03-30 15:21 ` Stephen Warren
2016-03-30 17:37 ` Eric Nelson
2016-03-30 17:34 ` Eric Nelson
2016-03-30 21:57 ` Stephen Warren
2016-03-31 20:24 ` Eric Nelson
2016-04-01 22:57 ` Stephen Warren
2016-04-01 23:16 ` Eric Nelson
2016-04-01 23:41 ` Tom Rini
2016-04-02 14:17 ` Eric Nelson
2016-04-02 2:07 ` Stephen Warren
2016-04-02 14:24 ` Eric Nelson
2016-04-02 1:59 ` [U-Boot] [U-Boot, V3, " Tom Rini
2016-04-02 14:19 ` Eric Nelson
2016-04-02 14:37 ` [U-Boot] [PATCH 0/3] minor blkcache updates Eric Nelson
2016-04-02 14:37 ` [U-Boot] [PATCH 1/3] cmd: blkcache: remove indentation from output of 'show' Eric Nelson
2016-04-12 2:28 ` [U-Boot] [U-Boot, " Tom Rini
2016-04-02 14:37 ` [U-Boot] [PATCH 2/3] cmd: blkcache: simplify sub-command handling Eric Nelson
2016-04-04 17:39 ` Stephen Warren
2016-04-12 2:28 ` [U-Boot] [U-Boot, " Tom Rini
2016-04-02 14:37 ` [U-Boot] [PATCH 3/3] drivers: block: fix placement of parameters Eric Nelson
2016-04-12 2:29 ` [U-Boot] [U-Boot, " Tom Rini
2016-03-27 19:00 ` [U-Boot] [PATCH 2/3] mmc: use block layer in mmc command Eric Nelson
2016-03-28 14:16 ` Tom Rini
2016-04-02 1:58 ` [U-Boot] [U-Boot,2/3] " Tom Rini
2016-03-27 19:00 ` [U-Boot] [PATCH 3/3] sata: use block layer for sata command Eric Nelson
2016-03-28 14:16 ` Tom Rini
2016-04-02 1:59 ` [U-Boot] [U-Boot,3/3] " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56EF559D.3040608@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox