lkml.org 
[lkml]   [2010]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cgroup: Avoid a memset by using vzalloc
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 <cl@linux.com> 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?



\
 
 \ /
  Last update: 2010-11-03 17:13    [W:0.065 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site