Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Aug 2003 20:46:03 -0700 (PDT) Received: from grok.yi.org (evrtwa1-ar2-4-33-045-084.evrtwa1.dsl-verizon.net [4.33.45.84]) by oss.sgi.com (8.12.9/8.12.5) with SMTP id h7T3jSWZ017920 for ; Thu, 28 Aug 2003 20:45:28 -0700 Received: from candelatech.com (localhost.localdomain [127.0.0.1]) by grok.yi.org (8.12.8/8.12.8) with ESMTP id h7T3jMFo005968; Thu, 28 Aug 2003 20:45:22 -0700 Message-ID: <3F4ECC52.5000406@candelatech.com> Date: Thu, 28 Aug 2003 20:45:22 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: ak@suse.de, anton@samba.org, netdev@oss.sgi.com Subject: Re: 100 network limit References: <20030828180019.GH12541@krispykreme> <20030828210855.58759b69.ak@suse.de> <3F4E783F.6080707@candelatech.com> <20030828164143.536d8d8a.davem@redhat.com> In-Reply-To: <20030828164143.536d8d8a.davem@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 5364 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 1184 Lines: 39 David S. Miller wrote: > On Thu, 28 Aug 2003 14:46:39 -0700 > Ben Greear wrote: > > >>Since you can rename devices, that might not work. A long time ago >>I hashed the devices, both by name and by index...that gives good >>lookup performance, at least. As for create-time issues, that is >>definately slow path, and even searching linearly 4 or 8k devices is >>not a big deal (in my opinion). So, why not make the hard-coded 100 >>limit be more like 8196 or something really large? (It could still >>be adjustable if needed.) > > > Right, it's also not going to fix the locking problems. > > I would suggest two things: > > 1) Ben's hashing patch for lookups. > > 2) RCU'ing read access to the device list. > I'm at least mostly on vacation for a week or so... Here is a pointer to the old patch I did..but it's ~2.5 years old. If anyone wants to get it working with recent code, please be my guest. Otherwise, I'll try to get something together in a few weeks. http://www.cs.helsinki.fi/linux/linux-kernel/2001-00/1227.html Take it easy, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com