Stop scheduler on panic
Andriy Gapon
avg at FreeBSD.org
Thu Nov 17 08:34:32 UTC 2011
on 17/11/2011 10:15 Kostik Belousov said the following:
> On Thu, Nov 17, 2011 at 01:07:38AM +0200, Alexander Motin wrote:
>> On 17.11.2011 00:21, Andriy Gapon wrote:
>>> Going further up the stack one can come up with the following proposals:
>>> - check SCHEDULER_STOPPED() swi_sched() and return early
>>> - do not call swi_sched() from xpt_done() if we somehow know that we are
>>> in a
>>> polling mode
>>
>> There is no flag in CAM now to indicate polling mode, but if needed, it
>> should not be difficult to add one and not call swi_sched().
>
> I have the following change for eons on my test boxes. Without it,
> I simply cannot get _any_ dump.
>
> diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
> index 10b89c7..a38e42f 100644
> --- a/sys/cam/cam_xpt.c
> +++ b/sys/cam/cam_xpt.c
> @@ -4230,7 +4230,7 @@ xpt_done(union ccb *done_ccb)
> TAILQ_INSERT_TAIL(&cam_simq, sim, links);
> mtx_unlock(&cam_simq_lock);
> sim->flags |= CAM_SIM_ON_DONEQ;
> - if (first)
> + if (first && panicstr == NULL)
> swi_sched(cambio_ih, 0);
> }
> }
I think that this (or similar) change should go into the patch and the tree.
--
Andriy Gapon
More information about the freebsd-current
mailing list