From: Jeff Liu <jeff.liu@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs: improve xfs_iext_destroy() by freeing extent indirection array directly
Date: Tue, 24 Sep 2013 22:05:20 +0800 [thread overview]
Message-ID: <52419C20.8040105@oracle.com> (raw)
In-Reply-To: <20130923235017.GX9901@dastard>
On 09/24/2013 07:50 AM, Dave Chinner wrote:
> On Mon, Sep 23, 2013 at 12:56:56PM +0800, Jeff Liu wrote:
>> On 09/23/2013 08:36 AM, Dave Chinner wrote:
>>
>>> On Fri, Sep 20, 2013 at 10:41:22PM +0800, Jeff Liu wrote:
>>>> From: Jie Liu <jeff.liu@oracle.com>
>>>>
>>>> To free the incore file extents stores at the indirection array, we
>>>> call the common routine xfs_iext_irec_remove() to remove a record
>>>> from the array one at a time in reverse order, which will resize an
>>>> extent indirection array repeatedly according to the array size.
>>>>
>>>> This is not often the case to make a file with thousands extent records
>>>> stores at an indirection array, but above operation is inefficient and
>>>> could result in memory fragments.
>>>
>>> Yes, it may be inefficient, but I don't see that it's a contributor
>>> to memory fragmentation as the reallocated buffer is freed shortly
>>> after it has been allocated as the array shrinks. Do you have any
>>> evidence to suggest that such behaviour is actually fragmenting
>>> memory? If so, is the any test case that reproduces this problem?
>>
>> Ah, yes, it should not cause memory fragmentation.
>>
>> The benefits is that this change could save alloc/free buffers depending
>> on the number of extents records are stored at indirection array.
>
> OK, can you send a new version with an updated commit message?
Sure, will post it soon.
Thanks,
-Jeff
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-09-24 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 14:41 [PATCH] xfs: improve xfs_iext_destroy() by freeing extent indirection array directly Jeff Liu
2013-09-23 0:36 ` Dave Chinner
2013-09-23 4:56 ` Jeff Liu
2013-09-23 23:50 ` Dave Chinner
2013-09-24 14:05 ` Jeff Liu [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-09-20 13:21 Jeff Liu
2013-09-20 14:39 ` Jeff Liu
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=52419C20.8040105@oracle.com \
--to=jeff.liu@oracle.com \
--cc=david@fromorbit.com \
--cc=xfs@oss.sgi.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