Fedora Linux Support Community & Resources Center
  #1  
Old 18th February 2012, 11:05 PM
tox
Guest
 
Posts: n/a
windows_7firefox
Btrfs: introduce extent buffer cache for each i-node

Quote:
[RFC][PATCH] Btrfs: introduce extent buffer cache for each i-node

Miao Xie
Thu, 16 Feb 2012 01:47:08 -0800

This patch introduce extent buffer cache for every i-node. By this
way, we needn't search the item from the root of b+ tree, and can
save the search time. Besides that we can also reduce the lock contention
of the root.

Implementation:
- add two pointers of extent buffer into btrfs_inode struct, one for
nodes/leaves of fs/file tree, the other for nodes/leaves of the log tree.
- add a BTRFS_HEADER_FLAG_COWED flag, which is used to mark the cowed
nodes/leaves
- When we want to search fs/file trees or the relative log trees, we must
try to search the cached extent buffer at first, if we can not find the
item, we will do the common search. At some condition, we will jump to
the common search directly:
I. a new transaction starts.
II. the cached extent buffer was cowed.
III. the cached extent buffer's level is below the level we must lock.
and so on.
And beside that, if we can not find the item, and the slot points to the
first the item or the last item in the leaf, we must jump out the cached
extent buffer search, and do the common search.
- After the common search (use btrfs_search_slot), we will cache the leaf
or the level-1 node into the btrfs i-node object.

I have do small file write performance (inline file) by sysbench for the patch,
and found it can make btrfs 5%~10% faster.

Surely, I will do function test(such as xfstests) and run more performance test
next to validate this patch. And there is some redundant code in this patch. I
will cleanup it in the next version.
Read More Here
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
btrfs - add RAID1 partition to existing encrypted btrfs parition techmum Using Fedora 0 4th July 2011 01:21 AM
I'd like to introduce myself markmental Wibble 11 15th June 2011 03:04 PM
LVM extent size merkava Using Fedora 1 5th November 2010 08:27 PM
Introduce text fields to scanned forms... mchauber Using Fedora 2 6th June 2010 03:57 PM


Current GMT-time: 22:54 (Tuesday, 29-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat