[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Xen: Force non-irq keyhandler to be run in tasklet when receive a debugkey from serial port



On Mon, Oct 24, 2016 at 10:43:57PM +0800, Lan, Tianyu wrote:
> 
> 
> On 10/24/2016 10:31 PM, Jan Beulich wrote:
> > > > > On 24.10.16 at 16:15, <tianyu.lan@xxxxxxxxx> wrote:
> > 
> > > 
> > > On 10/24/2016 9:54 PM, Jan Beulich wrote:
> > > > > > > On 24.10.16 at 15:29, <tianyu.lan@xxxxxxxxx> wrote:
> > > > > On 10/24/2016 8:19 AM, Konrad Rzeszutek Wilk wrote:
> > > > > > On Sat, Oct 22, 2016 at 07:23:03PM +0800, Lan Tianyu wrote:
> > > > > > > __serial_rx() runs in either irq handler or timer handler and 
> > > > > > > non-irq
> > > > > > > keyhandler should not run in these contexts. So always force 
> > > > > > > non-irq
> > > > > > > keyhandler to run in tasklet when receive a debugkey from serial 
> > > > > > > port
> > > > > > 
> > > > > > If the machine is hung with an IRQ handler being stuck, and
> > > > > > one does 'Ctrl-Ax3` followed by 'C' .. which would not be invoked
> > > > > > (as it is not an IRQ handler??
> > > > > 
> > > > > If serial port's interrupt still works in this case, the 'C'
> > > > > keyhandler kexec_crash() will be invoked in a tasklet. This behavior 
> > > > > was
> > > > > changed by my patches if includes this patch.
> > > 
> > > Sorry. A typo. I meant the behavior wasn't changed by my patches.
> > 
> > How was it not? The softirq machinery didn't get invoked in that case
> > prior to your patch, afaict.
> > 
> 
> Which softirq? You mean addiing process_pending_softirqs() in the
> dump_timerq()?

The softirq code gets executed _after_ the IRQ handler (do_IRQ) is finished
doing whatever it needs to do.

Which means that if have say:

 1) an errant piece of code that is spinning forever in
    a loop (say in do_IRQ and then perhaps in __do_IRQ_guest?)

 2) The system admin pressed 'Ctrl-A' three times followed by 'C',
    and ends up in the serial code. We schedule the tasklet, which
    calls 'tasklet_schedule_on_cpu' - which means the tasklet will
    only run on _this_ CPU. And then return back to 1)
    code.

 3) The 1) code keeps spinning forever, and we never call do_softirq
    which means we never process the tasklet.

That is the concern I have. I really really need 'C' to work so that
when things go wrong we can analyze the crashdump and figure out what
went wrong. But with your patch I can't create the crash dump.

I may also be wrong - maybe this is not the case and the crash dump
handler runs just fine (which is just fine). In which case please please
explain that in the commit description.

Thanks!


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.