freebsd-skq/sys
rwatson 68d9c43724 Add a new kernel option, MALLOC_MAKE_FAILURES, which compiles
in a debugging feature causing M_NOWAIT allocations to fail at
a specified rate.  This can be useful for detecting poor
handling of M_NOWAIT: the most frequent problems I've bumped
into are unconditional deference of the pointer even though
it's NULL, and hangs as a result of a lost event where memory
for the event couldn't be allocated.  Two sysctls are added:

debug.malloc.failure_rate

  How often to generate a failure: if set to 0 (default), this
  feature is disabled.  Otherwise, the frequency of failures --
  I've been using 10 (one in ten mallocs fails), but other
  popular settings might be much lower or much higher.

debug.malloc.failure_count

  Number of times a coerced malloc failure has occurred as a
  result of this feature.  Useful for tracking what might have
  happened and whether failures are being generated.

Useful possible additions: tying failure rate to malloc type,
printfs indicating the thread that experienced the coerced
failure.

Reviewed by:	jeffr, jhb
2003-03-26 20:18:40 +00:00
..
alpha Add a cleanup function to destroy the osname_lock and call it on module 2003-03-26 18:29:44 +00:00
amd64 Nuke HTT from here too. 2003-03-26 19:55:03 +00:00
arm - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
boot FreeBSD 5.0 has stopped shipping /modules 2.5 years ago. Catch 2003-03-11 12:09:25 +00:00
cam Clean up dynamically allocated sysctl variables when we run dacleanup() and 2003-03-26 04:38:39 +00:00
coda Set f_fstypename in coda_nb_statfs(). 2003-03-07 09:18:15 +00:00
compat Add a cleanup function to destroy the osname_lock and call it on module 2003-03-26 18:29:44 +00:00
conf Add a new kernel option, MALLOC_MAKE_FAILURES, which compiles 2003-03-26 20:18:40 +00:00
contrib Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
crypto Remove some unnecessary casts. 2003-01-25 22:41:22 +00:00
ddb Change the process flags P_KSES to be P_THREADED. 2003-02-27 02:05:19 +00:00
dev Begin support for 64-bit address support and workarounds for newer cards: 2003-03-26 17:50:11 +00:00
fs Replace the at_fork, at_exec, and at_exit functions with the slightly more 2003-03-24 21:15:35 +00:00
geom g_class_by_name() was unused too. 2003-03-25 09:11:17 +00:00
gnu - Lock the buf before clearing flags. 2003-03-13 07:07:16 +00:00
i4b - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
i386 Nuke HTT from here too. 2003-03-26 19:55:03 +00:00
ia64 - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
isa Correct an argument to bus_alloc_resource(). 2003-03-25 04:34:33 +00:00
isofs/cd9660 Rename vfs_stdsync function to vfs_stdnosync which matches more 2003-03-11 22:15:10 +00:00
kern Add a new kernel option, MALLOC_MAKE_FAILURES, which compiles 2003-03-26 20:18:40 +00:00
libkern Further GC of M_STRING, missed previously. 2003-02-26 01:00:29 +00:00
modules Merge PC98 support. 2003-03-25 05:19:18 +00:00
net - Use if_broadcastaddr from struct ifnet rather than relying on 2003-03-21 17:53:16 +00:00
netatalk - Use if_broadcastaddr from struct ifnet rather than relying on 2003-03-21 17:53:16 +00:00
netatm Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
netgraph Include correct opt_* headers for supported address families. Dike out 2003-03-08 16:25:27 +00:00
netinet Modify the mac_init_ipq() MAC Framework entry point to accept an 2003-03-26 15:12:03 +00:00
netinet6 made sure to keep the current stored lifetime when it was not updated 2003-03-26 17:37:35 +00:00
netipsec Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
netipx Remove unimplemented IP-in-IPX encapsulation support (options IPTUNNEL). 2003-03-08 06:58:22 +00:00
netkey Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netnatm Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
netncp Replace the at_fork, at_exec, and at_exit functions with the slightly more 2003-03-24 21:15:35 +00:00
netsmb Remove fragments of support for the FreeBSD 3.x and 4.x branches. 2003-03-06 10:38:18 +00:00
nfs Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
nfsclient Add O_NONBLOCK to the vn_open_cred() flags for NFS client locking when 2003-03-26 19:21:34 +00:00
nfsserver - Lock bufs before inspecting their flags. 2003-03-13 07:05:22 +00:00
opencrypto Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
pc98 Merge PC98 support. 2003-03-25 05:19:18 +00:00
pccard Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
pci - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
posix4 Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
powerpc - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
rpc
security Modify the mac_init_ipq() MAC Framework entry point to accept an 2003-03-26 15:12:03 +00:00
sparc64 - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
sys Modify the mac_init_ipq() MAC Framework entry point to accept an 2003-03-26 15:12:03 +00:00
tools Remove miidevs.h and generate it from miidevs at compile time. 2003-01-19 02:59:34 +00:00
ufs Use td->td_ucred instead of td->td_proc->p_ucred. 2003-03-20 21:17:40 +00:00
vm Obtain Giant before calling kmem_alloc without M_NOWAIT and before calling 2003-03-26 18:44:53 +00:00
Makefile