All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC V2 PATCH 0/3] Add cache for block devices
@ 2016-03-21  1:45 Eric Nelson
  2016-03-21  1:45 ` [U-Boot] [RFC V2 PATCH 1/3] drivers: block: add block device cache Eric Nelson
                   ` (4 more replies)
  0 siblings, 5 replies; 51+ messages in thread
From: Eric Nelson @ 2016-03-21  1:45 UTC (permalink / raw)
  To: u-boot

Here's a more full-featured implementation of a cache for block devices
that uses a small linked list of cache blocks.

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 

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

-- 
2.6.2

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2016-04-12  2:29 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [U-Boot] [RFC V2 PATCH 0/3] Add cache for block devices Marek Vasut
2016-03-21 13:48   ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.