freebsd-dev/sys/alpha
Robert Watson 84d2b7df26 Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(),
as they both interact with the tty code (!MPSAFE) and may sleep if the
tty buffer is full (per comment).

Modify all consumers of uprintf() and tprintf() to hold Giant around
calls into these functions.  In most cases, this means adding an
acquisition of Giant immediately around the function.  In some cases
(nfs_timer()), it means acquiring Giant higher up in the callout.

With these changes, UFS no longer panics on SMP when either blocks are
exhausted or inodes are exhausted under load due to races in the tty
code when running without Giant.

NB: Some reduction in calls to uprintf() in the svr4 code is probably
desirable.

NB: In the case of nfs_timer(), calling uprintf() while holding a mutex,
or even in a callout at all, is a bad idea, and will generate warnings
and potential upset.  This needs to be fixed, but was a problem before
this change.

NB: uprintf()/tprintf() sleeping is generally a bad ideas, as is having
non-MPSAFE tty code.

MFC after:	1 week
2005-09-19 16:51:43 +00:00
..
alpha Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
compile
conf Introduce a kernel config for the Mandatory Access Control framework. 2005-09-18 03:15:36 +00:00
include Relocate direct map specs into struct alpha_chipset. 2005-09-19 13:50:07 +00:00
isa Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
linux Move MODULE_DEPEND() statements for SYSVIPC dependencies to linux_ipc.c 2005-07-29 19:40:39 +00:00
mcbus Relocate direct map specs into struct alpha_chipset. 2005-09-19 13:50:07 +00:00
osf1 Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
pci Relocate direct map specs into struct alpha_chipset. 2005-09-19 13:50:07 +00:00
tlsb Relocate direct map specs into struct alpha_chipset. 2005-09-19 13:50:07 +00:00
Makefile