From: Chris Mason <chris.mason@oracle.com>
To: Yan Zheng <zheng.yan@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] initial version of reference cache
Date: Fri, 25 Jul 2008 23:38:37 +0000 [thread overview]
Message-ID: <1217029117.7572.84.camel@think.oraclecorp.com> (raw)
In-Reply-To: <21782573.1217014155193.JavaMail.oracle@acsmt304.oracle.com>
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
next prev parent reply other threads:[~2008-07-25 23:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 19:29 [PATCH] initial version of reference cache Yan Zheng
2008-07-25 23:38 ` Chris Mason [this message]
2008-07-26 14:26 ` Yan Zheng
2008-07-28 15:09 ` Chris Mason
[not found] ` <f058a9c30807280952m2386aad4pa8a08ffaf930c370@mail.gmail.com>
2008-07-28 16:53 ` Miguel Sousa Filipe
2008-07-29 0:25 ` Chris Mason
[not found] ` <4891C236.3000604@redhat.com>
2008-07-31 14:11 ` still see locking issues Chris Mason
2008-07-31 14:37 ` Chris Mason
-- strict thread matches above, loose matches on Subject: below --
2008-07-25 20:57 [PATCH] initial version of reference cache Yan Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1217029117.7572.84.camel@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=zheng.yan@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox