All of lore.kernel.org
 help / color / mirror / Atom feed
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: Mon, 25 Jan 2010 10:42:22 +0800	[thread overview]
Message-ID: <4B5D050E.2020204@oracle.com> (raw)
In-Reply-To: <4B5D02B3.5080303@oracle.com>



tristan wrote:
> Wow, thanks for such quick review:)
> 
> Tao Ma wrote:
>> Hi Tristan,
>>     Thanks for the work.
>>     Some comments inlined.
>>> +        if (phys_cpos != 0) {
>>> +            status = ocfs2_remove_btree_range(inode, &et, cpos,
>>> +                              phys_cpos, alloc_size,
>>> +                              &tc->tc_dealloc);
>>> +            if (status) {
>>> +                mlog_errno(status);
>>> +                goto bail;
>>> +            }
>>> +        }
>> I would really appreciate it if we can start from the end to the 
>> beginning. You know, if we start from cpos, when we remove an extent, 
>> the b-tree codes will try to rotate_tree_left. So if there are many 
>> extents for us to truncate, the performance will decrease a lot. While 
>> in the old implementation, we remove extents from the tail, so no 
>> b-tree rotation at all.
> 
> Wow, it's a significant improvement! great catch, tao.
> 
> I just copied idea from punching holes code, it also starts from begin 
> to end, as what you said, maybe we can also do the same improvement for 
> existing punching holes code, to remove the extents from end to begin. 
> how do you think about it?
yeah, actually we can improve the punching holes code also if you can 
provide a fantastic performance number. ;)

Regards,
Tao

  reply	other threads:[~2010-01-25  2:42 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 [this message]
2010-01-26 11:40   ` tristan
2010-02-05 23:14     ` Joel Becker
2010-02-06  0:47       ` Tao Ma
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=4B5D050E.2020204@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.