Date: Fri, 14 Apr 2006 14:27:28 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_event.c Message-ID: <200604141427.k3EERTfF080059@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2006-04-14 14:27:28 UTC
FreeBSD src repository
Modified files:
sys/kern kern_event.c
Log:
Drop the kqueue global mutex as soon as we are finished with it rather
than keeping it locked until we exit the function to optimize the case
where the lock would be dropped and later reacquired. The optimization
was broken when kevent's were moved from UFS to VFS and the knote list
lock for a vnode kevent became the lockmgr vnode lock. If one tried
to use a kqueue that contained events for a kqueue fd followed by a vnode,
then the kq global lock would end up being held when the vnode lock was
acquired which could result in sleeping with a mutex held (and subsequent
panics) if the vnode lock was contested.
Reviewed by: jmg
Tested by: ps (on 6.x)
MFC after: 3 days
Revision Changes Path
1.99 +2 -4 src/sys/kern/kern_event.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604141427.k3EERTfF080059>
