From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] Minor ext3 speedup Date: Sun, 16 Jan 2005 01:03:31 -0800 Message-ID: <20050116010331.3d9c30ec.akpm@osdl.org> References: <20050113121505.GA10014@atrey.karlin.mff.cuni.cz> <20050115170441.GR30982@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: jack@suse.cz, adilger@clusterfs.com, linux-fsdevel@vger.kernel.org Return-path: Received: from fw.osdl.org ([65.172.181.6]:5033 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S262464AbVAPJEE (ORCPT ); Sun, 16 Jan 2005 04:04:04 -0500 To: Matthew Wilcox In-Reply-To: <20050115170441.GR30982@parcelfarce.linux.theplanet.co.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Matthew Wilcox wrote: > > On Thu, Jan 13, 2005 at 01:15:06PM +0100, Jan Kara wrote: > > Attached patch removes unnecessary division and modulo from ext3 code > > paths. It reduces (according to oprofile) the CPU usage measurably under > > a dbench load (see description of the patch for the numbers). > > I thought I'd apply Jan & Andreas's patch to ext2 too. While doing so, > I noticed several places where patches had been applied to ext2 and not to > ext3. One of them was even a bugfix. This patch brings ext2/balloc.c > and ext3/balloc.c closer together and fixes the bug. It includes the > aforementioned patch for both ext2 and ext3. > > For the curious, the bug occurs when ext3_free_blocks_sb() decides to > "do_more". *pdquot_freed_blocks was updated each time around the loop, > so bg_free_blocks_count was getting over-incremented. I fixed it the > same way it had been fixed in ext2 -- by introducing a group_freed > variable that is reset each time around the loop. The patch does boatloads of other things too. Matthew. You know the routine ;)