Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761800AbXIRSFT (ORCPT ); Tue, 18 Sep 2007 14:05:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760510AbXIRSE5 (ORCPT ); Tue, 18 Sep 2007 14:04:57 -0400 Received: from e1.ny.us.ibm.com ([32.97.182.141]:36914 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759834AbXIRSEz (ORCPT ); Tue, 18 Sep 2007 14:04:55 -0400 Subject: Re: [PATCH] JBD slab cleanups From: Dave Kleikamp To: cmm@us.ibm.com Cc: Christoph Hellwig , Badari Pulavarty , Christoph Lameter , linux-fsdevel , ext4 development , lkml In-Reply-To: <1190133347.3819.6.camel@localhost.localdomain> References: <20070902152801.GA19962@infradead.org> <20070903134043.GB28962@infradead.org> <20070903193308.GA7771@infradead.org> <1189796027.3841.6.camel@localhost.localdomain> <1190057391.3845.22.camel@localhost.localdomain> <1190066466.31220.5.camel@dyn9047017100.beaverton.ibm.com> <1190069851.6725.6.camel@localhost.localdomain> <20070918090407.GA671@infradead.org> <1190133347.3819.6.camel@localhost.localdomain> Content-Type: text/plain Date: Tue, 18 Sep 2007 13:04:50 -0500 Message-Id: <1190138690.6528.23.camel@norville.austin.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1633 Lines: 36 On Tue, 2007-09-18 at 09:35 -0700, Mingming Cao wrote: > On Tue, 2007-09-18 at 10:04 +0100, Christoph Hellwig wrote: > > On Mon, Sep 17, 2007 at 03:57:31PM -0700, Mingming Cao wrote: > > > Here is the incremental small cleanup patch. > > > > > > Remove kamlloc usages in jbd/jbd2 and consistently use jbd_kmalloc/jbd2_malloc. > > > > Shouldn't we kill jbd_kmalloc instead? > > > > It seems useful to me to keep jbd_kmalloc/jbd_free. They are central > places to handle memory (de)allocation( in the future if we need to change memory allocation in jbd(e.g. not > using kmalloc or using different flag), we don't need to touch every > place in the jbd code calling jbd_kmalloc. I disagree. Why would jbd need to globally change the way it allocates memory? It currently uses kmalloc (and jbd_kmalloc) for allocating a variety of structures. Having to change one particular instance won't necessarily mean we want to change all of them. Adding unnecessary wrappers only obfuscates the code making it harder to understand. You wouldn't want every subsystem to have it's own *_kmalloc() that took different arguments. Besides, there aren't that many calls to kmalloc and kfree in the jbd code, so there wouldn't be much pain in changing GFP flags or whatever, if it ever needed to be done. Shaggy -- David Kleikamp IBM Linux Technology Center - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/