Re: dev_get_by_index is not hashed: O(n)

From: Ben Greear (greearb@candelatech.com)
Date: Thu Aug 29 2002 - 19:37:36 EST


David S. Miller wrote:
> From: Dennis <dennis@etinc.com>
> Date: Thu, 29 Aug 2002 18:16:00 -0400
>
> Yes, linux is quite a pig with 800 frame relay interfaces
>
> Try it with 'ip' or modern 'ifconfig' I bet your
> results change.
>
> Funniest part is that "ifconfig -a" doesn't even use
> dev_get_by_index so this whole conversation is one
> big crap :-)
>

What does it use? And btw, I'd hash get-by-name too.

The index hash is interesting because it's used so often in the kernel code,
though, evidently, not in critical paths as you note. Someday I'll put
a counter in to see how many times we do call it...just in case :)

Ben

-- 
Ben Greear <greearb@candelatech.com>          <Ben_Greear@excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

- To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html



This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:01 EST