cvs commit: src/sys/kern lwkt_thread.c
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed Jul 20 23:31:33 PDT 2005
dillon 2005/07/20 23:28:50 PDT
DragonFly src repository
Modified files:
sys/kern lwkt_thread.c
Log:
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 at xxxxxxxxxxxx>
Revision Changes Path
1.82 +24 -4 src/sys/kern/lwkt_thread.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/lwkt_thread.c.diff?r1=1.81&r2=1.82&f=u
More information about the Commits
mailing list