From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id 6D0BF7CDC for ; Thu, 7 Jul 2016 17:28:38 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay3.corp.sgi.com (Postfix) with ESMTP id D99A8AC055 for ; Thu, 7 Jul 2016 15:28:34 -0700 (PDT) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by cuda.sgi.com with ESMTP id jJZXZoKvSCWmEjyh for ; Thu, 07 Jul 2016 15:28:31 -0700 (PDT) Date: Fri, 8 Jul 2016 08:28:29 +1000 From: Dave Chinner Subject: Re: [QUESTION] about the freelist allocator in XFS Message-ID: <20160707222829.GG12670@dastard> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: Kaho Ng Cc: xfs@oss.sgi.com On Thu, Jul 07, 2016 at 07:01:35PM +0800, Kaho Ng wrote: > I am trying to investigate how freelist allocator in xfs interacts > with freespace B+Tree allocator. > First I prepared a patch > on > linux-source/fs/xfs/libxfs/xfs_alloc.c to print debugging messages > (The kernel version used is linux-3.10.0-327.22.2.el7). ...... > When reading the log output > , I > realised that there is no B+Tree split > triggered by xfs_alloc_fix_freelist() when calling xfs_free_extent(). > Isn't B+Tree split possible in by-size B+Tree even when truncating a > longer freespace record to shorter one? But what I found in the log is > only a few tree shrinks... And when reading the source code of > freespace allocator I found that a B+Tree growth in this case is > impossible at least... args->isfl doesn't mean what you think it means. args->isfl is only set when moving blocks from the freespace btree to the AGFL, which only occurs when a previous operation allocated a new freespace btree block and depleted the current freelist. i.e. "AG Free List" != "AG freespace btree" - they are different structures on disk... And when you consider that a freelist refill can only remove records from the the freespace btree, it's should be clear that a btree split won't occur during a freelist refill... Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs