lkml.org 
[lkml]   [2015]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree
> 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


\
 
 \ /
  Last update: 2015-05-02 08:41    [W:0.100 / U:1.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site