Re: [PATCH] initial version of reference cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/7/26 Chris Mason <chris.mason@xxxxxxxxxx>:
> 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?
>

When dropping old snapshots, tree leaves are processed in ascending
order of btrfs_key. After a given tree leaf is processed, we remove
the corresponding cache entry and update tree->last to point to next
entry in the tree. Therefore btrfs_lookup_leaf_ref can find the wanted
entry in tree->last in most cases.

Regards
YZ
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux