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

From: Julia Lawall
Date: Sat May 02 2015 - 02:02:14 EST


> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/