diff options
author | markm <markm@FreeBSD.org> | 2003-11-20 15:35:48 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2003-11-20 15:35:48 +0000 |
commit | 6a2f4748c445fb8d14b96292eb3eebc4b1d7ebf3 (patch) | |
tree | 3e94ea38c41e945cf21d08b665e850511809f4bc /sys/kern/subr_witness.c | |
parent | dced91d8f3c525ce50e8b61814028cfd393c983f (diff) | |
download | FreeBSD-src-6a2f4748c445fb8d14b96292eb3eebc4b1d7ebf3.zip FreeBSD-src-6a2f4748c445fb8d14b96292eb3eebc4b1d7ebf3.tar.gz |
Fix a major faux pas of mine. I was causing 2 very bad things to
happen in interrupt context; 1) sleep locks, and 2) malloc/free
calls.
1) is fixed by using spin locks instead.
2) is fixed by preallocating a FIFO (implemented with a STAILQ)
and using elements from this FIFO instead. This turns out
to be rather fast.
OK'ed by: re (scottl)
Thanks to: peter, jhb, rwatson, jake
Apologies to: *
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r-- | sys/kern/subr_witness.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 28d5605..02ba3a1 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -288,6 +288,8 @@ static struct witness_order_list_entry order_lists[] = { { "turnstile chain", &lock_class_mtx_spin }, { "td_contested", &lock_class_mtx_spin }, { "callout", &lock_class_mtx_spin }, + { "entropy harvest", &lock_class_mtx_spin }, + { "entropy harvest buffers", &lock_class_mtx_spin }, /* * leaf locks */ |