SCHEDULER_STOPPED vs kdb_active
Andriy Gapon
avg at FreeBSD.org
Mon Sep 5 11:26:07 UTC 2011
My simple question is whether kdb_active should be included as another indicator
into SCHEDULER_STOPPED?
I assume that kdb_active == true is visible only to the debugger code and never to
the debugged code. I understand that there is some code that can be executed in
both roles, but I am specifically asking about the roles, not the physical code.
So, is this true?
Assuming that the above is true, it doesn't make sense to not by-pass locking if
the debugger infrastructure executes some common code.
For example I don't understand why the kdb_active checks in kern_mutex.c are what
they are. I think that kdb_active means that the currently running code is the
only code that can make forward progress in the system. If we stumble upon a
locked spinlock, then it doesn't make any sense to spin on it waiting for Godot.
Similarly, I think that mtx_asser() should be a NOP if kdb_active.
What important things/scenarios do I overlook?
--
Andriy Gapon
More information about the freebsd-arch
mailing list