Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755298Ab0KCQKf (ORCPT ); Wed, 3 Nov 2010 12:10:35 -0400 Received: from smtp107.prem.mail.ac4.yahoo.com ([76.13.13.46]:26052 "HELO smtp107.prem.mail.ac4.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751861Ab0KCQKc (ORCPT ); Wed, 3 Nov 2010 12:10:32 -0400 X-Yahoo-SMTP: _Dag8S.swBC1p4FJKLCXbs8NQzyse1SYSgnAbY0- X-YMail-OSG: 8k8xt9oVM1kygaFYyJJ.uCBODBFUYRiOccGcoDM3KZX31gZ .b2PYOCN6ucul85G7HG4FLIgsxcZBgWhBlM6dt1Ar_9BYi0iZeJQHk3ku6vQ cJIPV8D0HytbgGxqpzvSIB5AB7UtYv6eZWLXSGqTGTP54SYHfGcsB8AgSKGX f1MU54JWt3b63tmsWQl1scr_StKQYXO7DD7OQqA.zFTqxCf.Msn2xP7mMHNO iSeTYxUHJxpc2Bc7uSIuZgqxzeoMpHhf6nWNP3mHP_W3oUlmy_mcWV7ZfFX_ YpE2Zr5qIqA-- X-Yahoo-Newman-Property: ymail-3 Date: Wed, 3 Nov 2010 11:10:28 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@router.home To: Joe Perches cc: jovi zhang , Jesper Juhl , Balbir Singh , Minchan Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Paul Menage , Li Zefan , containers@lists.linux-foundation.org Subject: Re: [PATCH] cgroup: Avoid a memset by using vzalloc In-Reply-To: <1288799284.15729.27.camel@Joe-Laptop> Message-ID: References: <20101031173336.GA28141@balbir.in.ibm.com> <1288799284.15729.27.camel@Joe-Laptop> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1223 Lines: 34 On Wed, 3 Nov 2010, Joe Perches wrote: > On Wed, 2010-11-03 at 23:20 +0800, jovi zhang wrote: > > On Wed, Nov 3, 2010 at 10:38 PM, Christoph Lameter wrote: > > > On Mon, 1 Nov 2010, Jesper Juhl wrote: > > > > > >> On Sun, 31 Oct 2010, Balbir Singh wrote: > > > > > >> > > There are so many placed need vzalloc. > > >> > > Thanks, Jesper. > > > > > > > > > Could we avoid this painful exercise with a "semantic patch"? > > There's an existing cocci kmalloc/memset script. I have it in /usr/share/doc/coccinelle/examples/janitorings/kzalloc-orig.cocci.gz (Ubuntu coccinelle package) > Perhaps this is good enough? > > cp scripts/coccinelle/api/alloc/kzalloc-simple.cocci scripts/coccinelle/api/alloc/vzalloc-simple.cocci > sed -i -e 's/kmalloc/vmalloc/g' -e 's/kzalloc/vzalloc/g' scripts/coccinelle/api/alloc/vzalloc-simple.cocci Not sure if that is the same script but certainly a good start. Try it and see if it catches all the locations that you know of? -- 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/