DragonFly commits List (threaded) for 2005-07
cvs commit: src/sys/kern lwkt_thread.c
dillon 2005/07/20 23:28:50 PDT
DragonFly src repository
Additional work to try to make panics operate better on SMP systems.
* Fix a bug in a kernel printf() (that occurs in a panic situation) so
the printf() itself doesn't fault out.
* The idle thread normally must never hold the BGL across a switch, since the
switch code must switch to the idle thread if no other threads are available.
However, since the machine can take a fatal kernel trap or panic in the
context of the idle thread it is possible for the idle thread to hold the
BGL during these particular situations. Additionally, the locking code
assumes that it can just set the thread's mpcount, call lwkt_switch(), and
not get the cpu back until the scheduler is able to obtain the BGL on
behalf of the thread. So have the scheduler deal with this situation.
This makes the scheduler look a bit messier then it really is but the code
paths in question only run during a panic or fatal kernel trap, so
performance should not be impaired.
From-dumps-provided-by: Peter Avalos <pavalos@xxxxxxxxxxxx>
Revision Changes Path
1.82 +24 -4 src/sys/kern/lwkt_thread.c