From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 9E3A47F3F for ; Mon, 23 Sep 2013 18:50:24 -0500 (CDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by relay2.corp.sgi.com (Postfix) with ESMTP id 8BBD5304043 for ; Mon, 23 Sep 2013 16:50:24 -0700 (PDT) Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net [150.101.137.143]) by cuda.sgi.com with ESMTP id cP3tdI0jbQ74oEIx for ; Mon, 23 Sep 2013 16:50:23 -0700 (PDT) Date: Tue, 24 Sep 2013 09:50:17 +1000 From: Dave Chinner Subject: Re: [PATCH] xfs: improve xfs_iext_destroy() by freeing extent indirection array directly Message-ID: <20130923235017.GX9901@dastard> References: <523C5E92.8000406@oracle.com> <20130923003617.GM12541@dastard> <523FCA18.1000204@oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <523FCA18.1000204@oracle.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Jeff Liu Cc: "xfs@oss.sgi.com" 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 > >> > >> 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? Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs