Subject: Re: [PATCH] [next-next-2.6] net: configurable device name hash

From: Octavian Purdila <[email-masked]>
Date: Wed, 11 Nov 2009 22:32:01 +0200

On Wednesday 11 November 2009 22:08:31 you wrote:
> Octavian Purdila a écrit :
> > On Wednesday 11 November 2009 21:21:20 you wrote:
> >> From: Octavian Purdila <[email-masked]>
> >> Date: Wed, 11 Nov 2009 21:16:14 +0200
> >>
> >>> Signed-off-by: Octavian Purdila <[email-masked]>
> >>
> >> We're not doing this sorry.
> >>
> >> Dynamically size it at boot time or something, but a config
> >> option is out of the question.
> >
> > I don't think we can dynamically size it at boot time since it depends on
> > the usage pattern which is impossible to determine at boot time, right?
> >
> > Would it be acceptable to grow it at runtime, in list_netdevice for
> > instance?
> 
> It will be really hard, now we use RCU lookups...
> 

OK, I've forgot about that :) 

> What workload could reasonably need 1.000.000 hash slots, and 16.000.000
>  netdevices ?
> 

And yes, I clearly get ahead of myself with that 20 bits. 

Lets say we will max it to 14 for machines with over 1G of memory, would it be 
acceptable to consume 64K out of that even if in most of the usecases we will 
only have a handful of interfaces?

So, on second thought, perhaps is better to leave this alone and have those 
few users who need it to change NETDEV_HASHBITS themselves - its not like its 
a too heavy patch to carry around.