From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Sat, 2 Apr 2016 07:19:02 -0700 Subject: [U-Boot] [U-Boot, V3, 1/3] drivers: block: add block device cache In-Reply-To: <20160402015916.GJ23166@bill-the-cat> References: <1459184744-15101-1-git-send-email-eric@nelint.com> <20160402015916.GJ23166@bill-the-cat> Message-ID: <56FFD4D6.8050007@nelint.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tom, On 04/01/2016 06:59 PM, Tom Rini wrote: > On Mon, Mar 28, 2016 at 10:05:44AM -0700, Eric Nelson wrote: > >> Add a block device cache to speed up repeated reads of block devices by >> various filesystems. >> >> This small amount of cache can dramatically speed up filesystem >> operations by skipping repeated reads of common areas of a block >> device (typically directory structures). >> >> This has shown to have some benefit on FAT filesystem operations of >> loading a kernel and RAM disk, but more dramatic benefits on ext4 >> filesystems when the kernel and/or RAM disk are spread across >> multiple extent header structures as described in commit fc0fc50. >> >> The cache is implemented through a minimal list (block_cache) maintained >> in most-recently-used order and count of the current number of entries >> (cache_count). It uses a maximum block count setting to prevent copies >> of large block reads and an upper bound on the number of cached areas. >> >> The maximum number of entries in the cache defaults to 32 and the maximum >> number of blocks per cache entry has a default of 2, which has shown to >> produce the best results on testing of ext4 and FAT filesystems. >> >> The 'blkcache' command (enabled through CONFIG_CMD_BLOCK_CACHE) allows >> changing these values and can be used to tune for a particular filesystem >> layout. >> >> Signed-off-by: Eric Nelson > > Applied to u-boot/master, thanks! > Whoops. I have a couple of minor updates from Stephen's last review that I'll forward shortly.