From: Tao Ma <tao.ma@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/1] Ocfs2: Treat ocfs2 truncate as a special case of punching holes v1.
Date: Sat, 06 Feb 2010 08:47:13 +0800 [thread overview]
Message-ID: <4B6CBC11.5040801@oracle.com> (raw)
In-Reply-To: <20100205231419.GD3416@mail.oracle.com>
Hi Joel,
Joel Becker wrote:
> On Tue, Jan 26, 2010 at 07:40:05PM +0800, tristan wrote:
>
>> Tao Ma wrote:
>> You're absolutely right, as what we expected, the original logic for
>> truncate was the most efficient one, new method using
>>
>
> <snip>
>
>
>> 1. Original logic:
>> 0.00user 33.06system 0:33.11elapsed 99%CPU
>>
>> 2. New logic(using ocfs2_remove_btree_range) from begin to end:
>> 0.00user 0.35system 0:00.52elapsed 67%CPU
>>
>> 3. New logic(using ocfs2_remove_btree_range) from end to begin:
>> 0.00user 1.15system 0:01.16elapsed 98%CPU
>>
>>
>> Look, method 1 was up to 100 times efficient than method 2, and 3 times
>> efficient than method 3.
>>
>
> I'm confused. You state above that the original method was the
> most efficient, yet it took 33 seconds. The remove_btree_range functions
> took .35s and 1.15s. By that measure the original is the worst. Or am
> I reading this wrong?
>
I guess Tristan pasted the wrong numbers here.
The original one is the most efficient since it dive into the b-tree
internals and no b-tree check up in ocfs2_remove_extent is not necessary.
The 2nd method is Tristan's original v1 patch, he call
ocfs2_remove_extent from i_size to end, so every time we need to
rotate_tree_left, so
the performance would be a disaster.
The 3rd method is what I suggest him to change. Although it is not as
efficient as 1, but it use ocfs2_remove_extent and truncate from the end
to the new i_size.
btw, tristan has pasted the newest patches. I don't know why he didn't
put a version number in it.
But please have a look at
http://oss.oracle.com/pipermail/ocfs2-devel/2010-February/005864.html
and http://oss.oracle.com/pipermail/ocfs2-devel/2010-February/005863.html
I guess they are ready to go.
Regards,
Tao
next prev parent reply other threads:[~2010-02-06 0:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-22 8:15 [Ocfs2-devel] [PATCH 1/1] Ocfs2: Treat ocfs2 truncate as a special case of punching holes v1 Tristan Ye
2010-01-25 2:12 ` Tao Ma
2010-01-25 2:32 ` tristan
2010-01-25 2:42 ` Tao Ma
2010-01-26 11:40 ` tristan
2010-02-05 23:14 ` Joel Becker
2010-02-06 0:47 ` Tao Ma [this message]
2010-02-08 1:44 ` tristan
2010-02-08 20:59 ` Joel Becker
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=4B6CBC11.5040801@oracle.com \
--to=tao.ma@oracle.com \
--cc=ocfs2-devel@oss.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.