Date: Wed, 17 Jul 2002 15:30:05 +0800 From: "David Xu" <davidx@viasoft.com.cn> To: "John Baldwin" <jhb@FreeBSD.ORG>, <cvs-committers@FreeBSD.ORG>, <cvs-all@FreeBSD.ORG> Subject: Re: cvs commit: src/sys/kern kern_descrip.c Message-ID: <010701c22d63$c5203630$ef01a8c0@davidwnt> References: <200207170248.g6H2mhx1051146@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message -----=20 From: "John Baldwin" <jhb@FreeBSD.ORG> To: <cvs-committers@FreeBSD.ORG>; <cvs-all@FreeBSD.ORG> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?010701c22d63$c5203630$ef01a8c0>