From owner-cvs-sys Thu Feb 20 05:30:43 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA12358 for cvs-sys-outgoing; Thu, 20 Feb 1997 05:30:43 -0800 (PST) Received: from sovcom.kiae.su (sovcom.kiae.su [193.125.152.1]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id FAA12342; Thu, 20 Feb 1997 05:30:32 -0800 (PST) Received: by sovcom.kiae.su id AA09480 (5.65.kiae-1 ); Thu, 20 Feb 1997 16:06:10 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Thu, 20 Feb 97 16:06:10 +0300 Received: (from ache@localhost) by nagual.ru (8.8.5/8.8.5) id QAA00747; Thu, 20 Feb 1997 16:03:57 +0300 (MSK) Date: Thu, 20 Feb 1997 16:03:52 +0300 (MSK) From: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= To: Bruce Evans Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/kern sys_generic.c In-Reply-To: <199702201151.DAA07900@freefall.freebsd.org> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Thu, 20 Feb 1997, Bruce Evans wrote: > bde 97/02/20 03:51:53 > > Modified: sys/kern sys_generic.c > Log: > Improved select(): > - avoid malloc() if the number of fds is small. > - pack the bits better so that `small' is quite large. > - don't waste time generating zero bits for null fd_set pointers or > scanning these bits. > > Possibly improved select(): > - free malloc()ed storage before returning. This is simpler and I > think huge select()s aren't worth optimizing since they are rare, > relative gain would be small and there would be tiny costs for all > selects(). Thanks, but I see no commit for removing p_selbits_size and p_selbits fields from struct proc... kern_exit.c also does free for p_selbits and needs fixing after remove. BTW, do we really need free() of malloc storage before return? If program use huge select once, in most practical cases it will mean that the same select code will be executed again, i.e. the same hudge select will be malloced/freeed. Maybe return to old p_selbits caching scheme? -- Andrey A. Chernov http://www.nagual.ru/~ache/