lkml.org 
[lkml]   [2013]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] device: Add kernel standard devm_k.alloc functions
Hello,

On Wed, Oct 09, 2013 at 12:04:42AM -0700, Joe Perches wrote:
> > > > > devm_kzalloc
> > > > > devm_kcalloc
> > > > > devm_kmalloc_array
> > > > >
> > > > > Add gfp.h to device.h for the newly added static inlines.
...
> Unless Tejun has an objection soon, yes.

Do we really need devm_kmalloc_array() for devm interface? The
reasonsing behind only having kzalloc was that it's not worthwhile
skipping zeroing for stuff happening during driver init/exit paths.
The resource management overhead itself is already significant and
unscalable compared to the raw cost of alloc/free and the interface
isn't supposed to be used in super-hot paths. Shouldn't
devm_kzalloc() and devm_kcalloc() be enough?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-10-09 19:01    [W:0.056 / U:2.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site