[HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree

Julia Lawall julia.lawall at lip6.fr
Sat May 2 06:02:02 UTC 2015


> Yes, I imagine Julia will include that as the new lustre_kvzalloc() define
> to be used in all OBD_ALLOC_LARGE instances.
> I can provide the desired code if necessary (it's actually a bit less than trivial
> because in some cases we also have that numa-aware node thing).

Oleg,

If you could send a patch with the proper definition, that would be very
helpful, thanks.  When that is in place, I can update the uses.

thanks,
julia

> though if we are ok to review that later, then almost a copy of ext4 one would do like this:
> void *lustre_kvzalloc(size_t size, gfp_t flags)
> {
>        void *ret;
> 
>        ret = kzalloc(size, flags | __GFP_NOWARN);
>        if (!ret)
>                ret = __vmalloc(size, flags | __GFP_ZERO, PAGE_KERNEL);
>        return ret;
> }
> 
> 
> Bye,
>     Oleg


More information about the devel mailing list