netdev
[Top] [All Lists]

Re: [PATCH] hashed device lookup (New Benchmarks)

To: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH] hashed device lookup (New Benchmarks)
From: Andi Kleen <ak@xxxxxx>
Date: Mon, 8 Jan 2001 17:50:36 +0100
Cc: "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <3A59EA1F.AEAD08A6@xxxxxxxxxxxxxxx>; from greearb@xxxxxxxxxxxxxxx on Mon, Jan 08, 2001 at 04:23:41PM +0100
References: <3A578F27.D2A9DF52@xxxxxxxxxxxxxxx> <20010107042959.A14330@xxxxxxxxxxxxxxxxxxx> <3A580B31.7998C783@xxxxxxxxxxxxxxx> <20010107062744.A15198@xxxxxxxxxxxxxxxxxxx> <3A58249F.86DD52BC@xxxxxxxxxxxxxxx> <3A597665.4B68C39@xxxxxxxxxxxxxxx> <200101080700.XAA10037@xxxxxxxxxxxxxxx> <3A59EA1F.AEAD08A6@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Mon, Jan 08, 2001 at 04:23:41PM +0100, Ben Greear wrote:
> I don't argue that ifconfig shouldn't be fixed, but the hash speeds up

It's already fixed since months. There was one stupid algorithm, which
I was to blame for when I changed ifconfig to use a device list two years ago.
At that time I didn't think that anybody would be ever crazy enough to set up
4000 interfaces and just chosed the simplest list management. I fixed it 
when you first complained a few months ago and now the list insertion works
that the list does not need to be walked fully in the usual case.
It could be optimized more in user space, but it's probably not worth it. 

> ip by about 2X too.  Is that not useful enough?  ip seems to be implemented
> pretty efficient, so if the hash helps it significantly then maybe it
> can help other efficient programs too.  Notice that it is the system
> (ie kernel) time that stays remarkably flat with the hash + ip graph.

Just does your benchmark represent anything that real users do frequently ? 

If you really want to optimize I'm sure there are lots of areas in the kernel
where your efforts are better spent ;) [just run with a the kernel profiler on
for a few days on your box and look at all the real hot spots] 

BTW, if you just want to optimize ip link ls speed it would be probably enough
to keep a one behind cache that just caches the next member after the last
search. 


-Andi

<Prev in Thread] Current Thread [Next in Thread>