Stop scheduler on panic

Attilio Rao attilio at freebsd.org
Fri Dec 2 17:18:37 UTC 2011


2011/12/2 John Baldwin <jhb at freebsd.org>:
> On 12/2/11 5:05 AM, Andriy Gapon wrote:
>>
>> on 02/12/2011 06:36 John Baldwin said the following:
>>>
>>> Ah, ok (I had thought SCHEDULER_STOPPED was going to always be true when
>>> kdb was
>>> active).  But I think these two changes should cover critical_exit() ok.
>>>
>>
>> I attempted to start a discussion about this a few times already :-)
>> Should we treat kdb context the same as SCHEDULER_STOPPED context (in the
>> current definition) ?  That is, skip all locks in the same fashion?
>> There are pros and contras.
>
>
> kdb should not block on locks, no.  Most debugger commands should not go
> near locks anyway unless they are intended to carefully modify the existing
> system in a safe manner (such as the 'kill' command which should only be
> using try locks and fail if it cannot safely post the signal).

The biggest problem to KDB as the same as panic is that doing proper
'continue' is impossible.
One of the features of the 'skip-locking' path is that it doesn't take
into account fast locking paths, where sometimes the lock can succeed
and other fails and you don't know about them. Also the restarted CPUs
can find corrupted datas (as they can be arbitrarely updated), I'm
sure it is too much panic prone.

BTW, I'm waiting for the details to settle (including the patch we
have been discussing internally about binding to CPU0 during ACPI
shutdown) before to read the whole thread and start a proper review,
would it be possible to have an almost-final version of the patch?

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein


More information about the freebsd-current mailing list