From owner-cvs-all Fri Oct 26 13:48:12 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1A00A37B401; Fri, 26 Oct 2001 13:48:05 -0700 (PDT) Received: (from dillon@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9QKm5A67668; Fri, 26 Oct 2001 13:48:05 -0700 (PDT) (envelope-from dillon) Message-Id: <200110262048.f9QKm5A67668@freefall.freebsd.org> From: Matt Dillon Date: Fri, 26 Oct 2001 13:48:04 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org To: cvs-committers@FreeBSD.org.cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_mutex.c kern_prot.c src/sys/sys mutex.h X-FreeBSD-CVS-Branch: HEAD 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 dillon 2001/10/26 13:48:04 PDT Modified files: sys/kern kern_mutex.c kern_prot.c sys/sys mutex.h Log: Add mtx_lock_giant() and mtx_unlock_giant() wrappers for sysctl management of Giant during the Giant unwinding phase, and start work on instrumenting Giant for the file and proc mutexes. These wrappers allow developers to turn on and off Giant around various subsystems. DEVELOPERS SHOULD NEVER TURN OFF GIANT AROUND A SUBSYSTEM JUST BECAUSE THE SYSCTL EXISTS! General developers should only considering turning on Giant for a subsystem whos default is off (to help track down bugs). Only developers working on particular subsystems who know what they are doing should consider turning off Giant. These wrappers will greatly improve our ability to unwind Giant and test the kernel on a (mostly) subsystem by subsystem basis. They allow Giant unwinding developers (GUDs) to emplace appropriate subsystem and structural mutexes in the main tree and then request that the larger community test the work by turning off Giant around the subsystem(s), without the larger community having to mess around with patches. These wrappers also allow GUDs to boot into a (more likely to be) working system in the midst of their unwinding work and to test that work under more controlled circumstances. There is a master sysctl, kern.giant.all, which defaults to 0 (off). If turned on it overrides *ALL* other kern.giant sysctls and forces Giant to be turned on for all wrapped subsystems. If turned off then Giant around individual subsystems are controlled by various other kern.giant.XXX sysctls. Code which overlaps multiple subsystems must have all related subsystem Giant sysctls turned off in order to run without Giant. Revision Changes Path 1.73 +42 -0 src/sys/kern/kern_mutex.c 1.116 +10 -7 src/sys/kern/kern_prot.c 1.44 +8 -0 src/sys/sys/mutex.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message