On Fri, 2008-07-25 at 14:29 -0500, Yan Zheng wrote: > Hello, > > This is the initial version of leaf reference cache. The cache stores leaf > node's extent references in memory, this can improve the performance of > snapshot dropping. Outlines of this patch are (1) allocate struct dirty_root > when starting transaction (2) put reference cache in struct dirty_root (3) > cache extent references when tree leaves are cow'ed (4) when dropping > snapshot, use cached references directly to avoid reading tree leaf. > > I only can access a notebook currenly, so benchmarking isn't enough. I > appreciate any help and comment. >
I have modified this locally to always cache leaves, even when they don't have file extents in them. That way, walk_down_tree will find the cache and won't have to read the leaf (that doesn't have any extents). So far, it is working very well. I did a run with fs_mark to create 58 million files and had very steady numbers. The unmount took 4 seconds. It used to take over an hour. One question, why not use the block number (byte number) as the key to the rbtree instead of the key? -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html