Re: [HPDD-discuss] [PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

2014-09-19 Thread Julia Lawall
On Fri, 19 Sep 2014, Drokin, Oleg wrote: > Hello! > >First, thanks for your patches and efforts spent on these cleanups. > > On Sep 19, 2014, at 12:45 AM, Julia Lawall wrote: > > > With respect to the upper case lower case issue, does the thing need to be > > a macro? I think that the lower

Re: [HPDD-discuss] [PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

2014-09-19 Thread Drokin, Oleg
Hello! First, thanks for your patches and efforts spent on these cleanups. On Sep 19, 2014, at 12:45 AM, Julia Lawall wrote: > With respect to the upper case lower case issue, does the thing need to be > a macro? I think that the lowercase is more or less fine, but only if > what is behind i

Re: [PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

2014-09-19 Thread Drokin, Oleg
On Sep 19, 2014, at 5:11 AM, Dan Carpenter wrote: > On Fri, Sep 19, 2014 at 02:57:03AM +, Drokin, Oleg wrote: >> 4. Sometimes we need large allocations. general kmalloc is less >> reliable as system lives on and memory fragmentation worsens. So we >> have this "allocations over 2-4 pages get

Re: [PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

2014-09-19 Thread Dan Carpenter
On Fri, Sep 19, 2014 at 02:57:03AM +, Drokin, Oleg wrote: > 4. Sometimes we need large allocations. general kmalloc is less > reliable as system lives on and memory fragmentation worsens. So we > have this "allocations over 2-4 pages get switched to vmalloc" logic, > if there's a way to do that

Re: [HPDD-discuss] [PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

2014-09-18 Thread Julia Lawall
With respect to the upper case lower case issue, does the thing need to be a macro? I think that the lowercase is more or less fine, but only if what is behind it is a function. I say more or less fine, because normally in the kernel the special allocators have special purposes, eg allocating and

Re: [HPDD-discuss] [PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

2014-09-18 Thread Drokin, Oleg
On Sep 18, 2014, at 10:57 PM, Drokin, Oleg wrote: > would not be easy to do. Perhaps registered callbacks for pools that could be > called on alloc and on free - though such pools would also need to allow to > allocate different sized chunks too). Come think of it - we don't even need callback

Re: [PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

2014-09-18 Thread Drokin, Oleg
Hello! On Sep 18, 2014, at 7:43 PM, Dan Carpenter wrote: > On Thu, Sep 18, 2014 at 10:24:02PM +0200, Julia Lawall wrote: >> From: Julia Lawall >> >> This patch removes some kzalloc-related macros and rewrites the >> associated null tests to use !x rather than x == NULL. > This is sort of exactl

Re: [PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

2014-09-18 Thread Dan Carpenter
On Thu, Sep 18, 2014 at 10:24:02PM +0200, Julia Lawall wrote: > From: Julia Lawall > > This patch removes some kzalloc-related macros and rewrites the > associated null tests to use !x rather than x == NULL. > This is sort of exactly what Oleg asked us not to do in his previous email. ;P I th

[PATCH] staging: lustre: llite: Use kzalloc and rewrite null tests

2014-09-18 Thread Julia Lawall
From: Julia Lawall This patch removes some kzalloc-related macros and rewrites the associated null tests to use !x rather than x == NULL. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; statement S,S1; @@ \(