From: Philippe Gerum <rpm@xenomai.org>
To: "Chen, Hongzhan" <hongzhan.chen@intel.com>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: gdb test failure debug status update
Date: Fri, 30 Apr 2021 10:00:32 +0200 [thread overview]
Message-ID: <875z042odb.fsf@xenomai.org> (raw)
In-Reply-To: <87bl9w2pkm.fsf@xenomai.org>
Philippe Gerum <rpm@xenomai.org> writes:
> Chen, Hongzhan <hongzhan.chen@intel.com> writes:
>
>> The final xnthread_relaxed call path is like this asm_sysv_apic_timer_interrupt ->handle_irq_pipelined_finish
>> ->dovetail_call_mayday ->handle_oob_mayday>xnthread_relax.
>> That means that handle_irq_pipelined_finish is called under OOB condition of arch_pipeline_entry in
>> arch/x86/kernel/irq_pipeline.c. Does that means that kernel entry/exit code is never called after return from
>> xnthread_relax to handle_irq_pipelined_finish then to asm_sysv_apic_timer_interrupt? Even I enforce to
>> call dovetail_request_ucall before calling final xnthread_relax system would not try to switch back to primary mode
>> because kernel exit code is never called in this case?
>>
>
> The IRQ frame is indeed kept from unwinding until the preempted task
> context returns from irq_exit_pipeline(), which branches to the Cobalt
> rescheduling procedure. From the Dovetail interface POV,
> irq_exit_pipeline() is called by handle_irq_pipelined_finish() to allow
> the companion core to perform post-IRQ chores, such as running its own
> rescheduling procedure.
>
> IOW, if task @foo is preempted by an IRQ, then suspended in oob context
> as a result of what the interrupt handler just did for it (e.g. raising
> XNDBGSTOP, XNRELAX, XNPEND, XNSUSP in its state), then
> handle_irq_pipelined_finish()->irq_exit_pipeline()->xnsched_run() will
> cause the @foo context to switch away, effectively preventing
> handle_irq_pipelined_finish() to return, until @foo resumes execution
> eventually.
>
> The underlying issue I'd like to understand, is why do we have a mayday
> condition raised in the context of this test in the first place? That
> may be the root of the issue, the mayday and synchronous-bp handling
> code may not cope that well.
>
> So, question to address first: who ends up calling
> dovetail_call_mayday(), detecting that the underlying task went south?
> And why that?
Possibly a caller of __xnthread_kick() is causing that, e.g.
handle_sigwake_event -> __xnthread_kick.
--
Philippe.
next prev parent reply other threads:[~2021-04-30 8:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-28 3:19 gdb test failure debug status update Chen, Hongzhan
2021-04-28 14:18 ` Philippe Gerum
2021-04-28 14:30 ` Philippe Gerum
2021-04-29 6:31 ` Chen, Hongzhan
2021-04-30 5:25 ` Chen, Hongzhan
2021-04-30 5:51 ` Chen, Hongzhan
2021-04-30 7:36 ` Philippe Gerum
2021-04-30 7:34 ` Philippe Gerum
2021-04-30 8:00 ` Philippe Gerum [this message]
2021-04-30 8:07 ` Chen, Hongzhan
[not found] ` <DM5PR11MB18529649C47BF241930A2217F25E9@DM5PR11MB1852.namprd11.prod.outlook.com>
[not found] ` <8735v82jmd.fsf@xenomai.org>
2021-05-06 2:00 ` Chen, Hongzhan
2021-05-07 1:10 ` Chen, Hongzhan
2021-05-09 17:46 ` Philippe Gerum
2021-05-09 17:49 ` Philippe Gerum
2021-05-10 2:16 ` Chen, Hongzhan
2021-05-15 15:55 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875z042odb.fsf@xenomai.org \
--to=rpm@xenomai.org \
--cc=hongzhan.chen@intel.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.