freebsd-skq/sys/i386
rwatson c479a90eb8 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
..
acpica Canonize the include of acpi.h. 2005-09-11 18:39:03 +00:00
bios Fix build (including both asm.h and asmacros.h is evil). 2005-07-22 15:01:07 +00:00
compile
conf Introduce a kernel config for the Mandatory Access Control framework. 2005-09-18 03:15:36 +00:00
cpufreq Print cpu_vendor and the MSR value if we don't support this processor 2005-07-31 06:42:27 +00:00
i386 Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
ibcs2 Add missing dependencies on the SYSVIPC modules. 2005-07-29 19:41:04 +00:00
include Expose legacy_pcib_alloc_resource, and use it in the mptable pci bus 2005-09-17 23:57:53 +00:00
isa Remove the el(4) driver for 3Com 3c501 ISA NICs from HEAD as threatened 2005-08-26 13:42:04 +00:00
linux Propagate error code of kern_execve() to the caller properly. 2005-08-01 17:35:48 +00:00
pci Expose legacy_pcib_alloc_resource, and use it in the mptable pci bus 2005-09-17 23:57:53 +00:00
svr4 /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
Makefile