Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965246AbVIOEGq (ORCPT ); Thu, 15 Sep 2005 00:06:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965250AbVIOEGq (ORCPT ); Thu, 15 Sep 2005 00:06:46 -0400 Received: from dsl027-180-168.sfo1.dsl.speakeasy.net ([216.27.180.168]:19625 "EHLO sunset.davemloft.net") by vger.kernel.org with ESMTP id S965246AbVIOEGp (ORCPT ); Thu, 15 Sep 2005 00:06:45 -0400 Date: Wed, 14 Sep 2005 21:06:40 -0700 (PDT) Message-Id: <20050914.210640.63539596.davem@davemloft.net> To: dada1@cosmosbay.com Cc: sonny@burdell.org, torvalds@osdl.org, linux-kernel@vger.kernel.org Subject: Re: "Read my lips: no more merges" - aka Linux 2.6.14-rc1 From: "David S. Miller" In-Reply-To: <43267A00.1010405@cosmosbay.com> References: <20050913063359.GA29715@kevlar.burdell.org> <43267A00.1010405@cosmosbay.com> X-Mailer: Mew version 4.2.53 on Emacs 21.4 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 887 Lines: 19 From: Eric Dumazet Date: Tue, 13 Sep 2005 09:04:32 +0200 > And if your process has many files opened, the cost (read : latency) > of open() can be very high, finding a zero bit in a large bit array. ... > I wish a process param could allow open() to take any free fd > available, not > the lowest one. One can always use fcntl(fd, F_DUPFD, > slot) to move a fd on a > specific high slot and always keep the 64 > first fd slots free to speedup the > kernel part at > open()/dup()/socket() time. Why not just remember the lowest available free slot and start each bitmap search there? This is a quite common technique. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/