netdev
[Top] [All Lists]

Re: [PATCH] (4/4) Support for lots of netdev's -- faster dev_alloc_name

To: Stephen Hemminger <shemminger@xxxxxxxx>
Subject: Re: [PATCH] (4/4) Support for lots of netdev's -- faster dev_alloc_name
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Fri, 6 Feb 2004 14:37:57 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040206101232.46bc30b1.shemminger@xxxxxxxx>
References: <20040206101232.46bc30b1.shemminger@xxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Fri, 6 Feb 2004 10:12:32 -0800
Stephen Hemminger <shemminger@xxxxxxxx> wrote:

> Convert dev_alloc_name from O(n^2) lookup to O(n) by using a page as
> bitmap to figure out how many devices of that pattern have been allocated.
> This works for up to 32k devices (PAGE_SIZE*8) on i386, more on other
> platforms.  Correctly handles the boundary cases where number of devices
> won't fit because name length is limited.
> 
> Adds strnchr to the string libraries since we need to find the % format
> character, but only care if it is in the first 15 bytes.

Ok, applied, thanks Stephen.

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