lkml.org 
[lkml]   [2011]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Allow setting of number of raw devices as a module parameter
> > A large vmalloc array is very antisocial on a 32bit x86 box. It looks
> > like almost all of it would become sane if there was an array of pointers
> > to raw devices and the devices were initially allocated on need (even if
> > for now only recovered on rmmod)
>
> In practice, we've never seen a problem with this[1]. Machines that
> want thousands of raw devices have plenty of memory to handle this
> situation.
>
> I doubt adding the complexity of dynamically allocating the devices
> as-needed is worth it for the very few systems that ever use this
> driver, compounded with the fact that we keep saying that this code
> isn't to be used by "normal" people anyway.

That's no excuse for sloppy code. Making it an array populated on demand
is an improvement for everyone, making it vmalloc hurts every access (in
TLB misses for one as well as vmalloc overhead).

I note two of us immediately made the same observation. Doing it
basically right (array of pointers) is easy. Doing the full works with a
hash for the lookups is a bit harder and that I would agree is overkill.

Alan


\
 
 \ /
  Last update: 2011-04-30 17:43    [from the cache]
©2003-2011 Jasper Spaans