From owner-cvs-all Wed Jul 17 0:40: 7 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC40937B400; Wed, 17 Jul 2002 00:39:58 -0700 (PDT) Received: from mail.viasoft.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65FD643E3B; Wed, 17 Jul 2002 00:39:54 -0700 (PDT) (envelope-from davidx@viasoft.com.cn) Received: from davidwnt (davidwnt.viasoft.com.cn [192.168.1.239]) by mail.viasoft.com.cn (8.9.3/8.9.3) with SMTP id PAA13544; Wed, 17 Jul 2002 15:56:16 +0800 Message-ID: <010701c22d63$c5203630$ef01a8c0@davidwnt> From: "David Xu" To: "John Baldwin" , , References: <200207170248.g6H2mhx1051146@freefall.freebsd.org> Subject: Re: cvs commit: src/sys/kern kern_descrip.c Date: Wed, 17 Jul 2002 15:30:05 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-Mimeole: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message -----=20 From: "John Baldwin" To: ; Sent: Wednesday, July 17, 2002 10:48 AM Subject: cvs commit: src/sys/kern kern_descrip.c > jhb 2002/07/16 19:48:43 PDT >=20 > Modified files: > sys/kern kern_descrip.c=20 > Log: > Preallocate a struct file as the first thing in falloc() before we = lock > the filelist_lock and check nfiles. This closes a race where we had = to > unlock the filedesc to re-lock the filelist_lock. > =20 > Reported by: David Xu > Reviewed by: bde (mostly) > =20 > Revision Changes Path > 1.150 +5 -16 src/sys/kern/kern_descrip.c >=20 holds filelist_lock and does not release until function returns,=20 this lock seems too big for me. it almostly forces the whole system to serialize through open() syscall. I see filelist_lock only maintain global opened file list. why should a program calling falloc be blocked out by another program calling falloc so long time? David Xu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message