Re: [PATCH 3/7] btrfs-progs: extent-cache: actually cache extent buffers
From: David Sterba <hidden>
Date: 2017-08-22 15:46:10
On Tue, Jul 25, 2017 at 04:51:34PM -0400, jeffm@suse.com wrote:
From: Jeff Mahoney <redacted> We have the infrastructure to cache extent buffers but we don't actually do the caching. As soon as the last reference is dropped, the buffer is dropped. This patch keeps the extent buffers around until the max cache size is reached (defaults to 25% of memory) and then it drops the last 10% of the LRU to free up cache space for reallocation. The cache size is configurable (for use by e.g. lowmem) when the cache is initialized. Signed-off-by: Jeff Mahoney <redacted>
I've started to merge the series, changed code according to the review. In this patch, test-mkfs and test-check fail (segfaults and assertions). A debugging build or asan (make D=all,asan) does not reproduce the errors so this will need to be found by other means. I also fixed some trivial coding style issues, so the changes are now in the branch https://github.com/kdave/btrfs-progs/tree/ext/jeffm/extent-cache Please use this as a starting point, I'm fine with resending just this patch or an incremental.