cvs commit: src/sys/kern kern_descrip.c
Robert Watson
rwatson at FreeBSD.org
Sun Nov 28 06:37:18 PST 2004
rwatson 2004-11-28 14:37:17 UTC
FreeBSD src repository
Modified files:
sys/kern kern_descrip.c
Log:
Don't acquire Giant before calling closef() in close() (and elsewhere);
instead acquire it conditionally in closef() if it is required for
advisory locking. This removes Giant from the close() path of sockets
and pipes (and any other objects that don't acquire Giant in their
fo_close path, such as kqueues). Giant will still be acquired twice for
vnodes -- once for advisory lock teardown, and a second time in the
fo_close method. Both Poul-Henning and I believe that the advisory lock
teardown code can be moved into the vn_closefile path shortly.
This trims a percent or two off the cost of most non-vnode close
operations on SMP, but has a fairly minimal impact on UP where the cost
of a single mutex operation is pretty low.
Revision Changes Path
1.258 +7 -7 src/sys/kern/kern_descrip.c
More information about the cvs-src
mailing list