* [Xenomai-core] [PATCH] Suppress switch warnings while debugging
@ 2009-03-10 9:06 Jan Kiszka
2009-03-10 9:30 ` Philippe Gerum
2009-03-10 10:32 ` [Xenomai-core] [PATCH v2] " Jan Kiszka
0 siblings, 2 replies; 6+ messages in thread
From: Jan Kiszka @ 2009-03-10 9:06 UTC (permalink / raw)
To: xenomai-core
Don't raise SIGXCPU while the process is being debugged. These mode
changes are expected, and reporting them doesn't provide any helpful
information to the application. Rather, it may raise error storms on the
application side.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
ksrc/nucleus/shadow.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index bcf3b8b..91cf499 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)
xnstat_counter_inc(&thread->stat.ssw); /* Account for secondary mode switch. */
- if (notify && xnthread_test_state(thread, XNTRAPSW))
+ if (notify && xnthread_test_state(thread, XNTRAPSW) &&
+ !xnthread_test_state(thread, XNDEBUG))
/* Help debugging spurious relaxes. */
send_sig(SIGXCPU, current, 1);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] [PATCH] Suppress switch warnings while debugging
2009-03-10 9:06 [Xenomai-core] [PATCH] Suppress switch warnings while debugging Jan Kiszka
@ 2009-03-10 9:30 ` Philippe Gerum
2009-03-10 9:41 ` Jan Kiszka
2009-03-10 10:32 ` [Xenomai-core] [PATCH v2] " Jan Kiszka
1 sibling, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2009-03-10 9:30 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
Jan Kiszka wrote:
> Don't raise SIGXCPU while the process is being debugged. These mode
> changes are expected, and reporting them doesn't provide any helpful
> information to the application. Rather, it may raise error storms on the
> application side.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
> ---
>
> ksrc/nucleus/shadow.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
> index bcf3b8b..91cf499 100644
> --- a/ksrc/nucleus/shadow.c
> +++ b/ksrc/nucleus/shadow.c
> @@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)
>
> xnstat_counter_inc(&thread->stat.ssw); /* Account for secondary mode switch. */
>
> - if (notify && xnthread_test_state(thread, XNTRAPSW))
> + if (notify && xnthread_test_state(thread, XNTRAPSW) &&
> + !xnthread_test_state(thread, XNDEBUG))
> /* Help debugging spurious relaxes. */
> send_sig(SIGXCPU, current, 1);
>
I would rather identify the source of the switch and clear the notify flag
appropriately from the relax call site.
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
>
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] [PATCH] Suppress switch warnings while debugging
2009-03-10 9:30 ` Philippe Gerum
@ 2009-03-10 9:41 ` Jan Kiszka
2009-03-10 9:56 ` Philippe Gerum
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2009-03-10 9:41 UTC (permalink / raw)
To: rpm; +Cc: xenomai-core
Philippe Gerum wrote:
> Jan Kiszka wrote:
>> Don't raise SIGXCPU while the process is being debugged. These mode
>> changes are expected, and reporting them doesn't provide any helpful
>> information to the application. Rather, it may raise error storms on the
>> application side.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
>> ---
>>
>> ksrc/nucleus/shadow.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
>> index bcf3b8b..91cf499 100644
>> --- a/ksrc/nucleus/shadow.c
>> +++ b/ksrc/nucleus/shadow.c
>> @@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)
>>
>> xnstat_counter_inc(&thread->stat.ssw); /* Account for
>> secondary mode switch. */
>>
>> - if (notify && xnthread_test_state(thread, XNTRAPSW))
>> + if (notify && xnthread_test_state(thread, XNTRAPSW) &&
>> + !xnthread_test_state(thread, XNDEBUG))
>> /* Help debugging spurious relaxes. */
>> send_sig(SIGXCPU, current, 1);
>>
>
> I would rather identify the source of the switch and clear the notify
> flag appropriately from the relax call site.
Sorry, don't get this: What flag do you want to clear? XNTRAPSW?
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] [PATCH] Suppress switch warnings while debugging
2009-03-10 9:41 ` Jan Kiszka
@ 2009-03-10 9:56 ` Philippe Gerum
2009-03-10 10:02 ` Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2009-03-10 9:56 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
Jan Kiszka wrote:
> Philippe Gerum wrote:
>> Jan Kiszka wrote:
>>> Don't raise SIGXCPU while the process is being debugged. These mode
>>> changes are expected, and reporting them doesn't provide any helpful
>>> information to the application. Rather, it may raise error storms on the
>>> application side.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
>>> ---
>>>
>>> ksrc/nucleus/shadow.c | 3 ++-
>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
>>> index bcf3b8b..91cf499 100644
>>> --- a/ksrc/nucleus/shadow.c
>>> +++ b/ksrc/nucleus/shadow.c
>>> @@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)
>>>
>>> xnstat_counter_inc(&thread->stat.ssw); /* Account for
>>> secondary mode switch. */
>>>
>>> - if (notify && xnthread_test_state(thread, XNTRAPSW))
>>> + if (notify && xnthread_test_state(thread, XNTRAPSW) &&
>>> + !xnthread_test_state(thread, XNDEBUG))
>>> /* Help debugging spurious relaxes. */
>>> send_sig(SIGXCPU, current, 1);
>>>
>> I would rather identify the source of the switch and clear the notify
>> flag appropriately from the relax call site.
>
> Sorry, don't get this: What flag do you want to clear? XNTRAPSW?
>
The "notify" parameter should set by the call site to tell xnshadow_relax()
whether we want the SIGXCPU signal to be sent or not. I would rather identify
which call site introduces the issue, and fix the notify parameter accordingly.
Did you track the issue down to request_syscall_restart() for instance? In which
case, we should rather test XNDEBUG there, and set the notify flag passed to
xnshadow_relax() appropriately.
> Jan
>
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] [PATCH] Suppress switch warnings while debugging
2009-03-10 9:56 ` Philippe Gerum
@ 2009-03-10 10:02 ` Jan Kiszka
0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2009-03-10 10:02 UTC (permalink / raw)
To: rpm; +Cc: xenomai-core
Philippe Gerum wrote:
> Jan Kiszka wrote:
>> Philippe Gerum wrote:
>>> Jan Kiszka wrote:
>>>> Don't raise SIGXCPU while the process is being debugged. These mode
>>>> changes are expected, and reporting them doesn't provide any helpful
>>>> information to the application. Rather, it may raise error storms on
>>>> the
>>>> application side.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
>>>> ---
>>>>
>>>> ksrc/nucleus/shadow.c | 3 ++-
>>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
>>>> index bcf3b8b..91cf499 100644
>>>> --- a/ksrc/nucleus/shadow.c
>>>> +++ b/ksrc/nucleus/shadow.c
>>>> @@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)
>>>>
>>>> xnstat_counter_inc(&thread->stat.ssw); /* Account for
>>>> secondary mode switch. */
>>>>
>>>> - if (notify && xnthread_test_state(thread, XNTRAPSW))
>>>> + if (notify && xnthread_test_state(thread, XNTRAPSW) &&
>>>> + !xnthread_test_state(thread, XNDEBUG))
>>>> /* Help debugging spurious relaxes. */
>>>> send_sig(SIGXCPU, current, 1);
>>>>
>>> I would rather identify the source of the switch and clear the notify
>>> flag appropriately from the relax call site.
>>
>> Sorry, don't get this: What flag do you want to clear? XNTRAPSW?
>>
>
> The "notify" parameter should set by the call site to tell
> xnshadow_relax() whether we want the SIGXCPU signal to be sent or not. I
> would rather identify which call site introduces the issue, and fix the
> notify parameter accordingly. Did you track the issue down to
> request_syscall_restart() for instance? In which case, we should rather
> test XNDEBUG there, and set the notify flag passed to xnshadow_relax()
> appropriately.
OK, now I understand. I didn't track this down yet, but it must be
request_syscall_restart, because that should be the only site that
relaxes due to pending signals. Will update the patch.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Xenomai-core] [PATCH v2] Suppress switch warnings while debugging
2009-03-10 9:06 [Xenomai-core] [PATCH] Suppress switch warnings while debugging Jan Kiszka
2009-03-10 9:30 ` Philippe Gerum
@ 2009-03-10 10:32 ` Jan Kiszka
1 sibling, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2009-03-10 10:32 UTC (permalink / raw)
To: xenomai-core
Don't raise SIGXCPU while the process is being debugged. These mode
changes are expected, and reporting them doesn't provide any helpful
information to the application. Rather, it may raise error storms on the
application side.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
ksrc/nucleus/shadow.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index bcf3b8b..12b4073 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -667,7 +667,7 @@ static inline void request_syscall_restart(xnthread_t *thread,
__xn_error_return(regs,
(sysflags & __xn_exec_norestart) ?
-ERESTARTNOHAND : -ERESTARTSYS);
- notify = 1;
+ notify = !xnthread_test_state(thread, XNDEBUG);
}
xnthread_clear_info(thread, XNKICKED);
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-03-10 10:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-10 9:06 [Xenomai-core] [PATCH] Suppress switch warnings while debugging Jan Kiszka
2009-03-10 9:30 ` Philippe Gerum
2009-03-10 9:41 ` Jan Kiszka
2009-03-10 9:56 ` Philippe Gerum
2009-03-10 10:02 ` Jan Kiszka
2009-03-10 10:32 ` [Xenomai-core] [PATCH v2] " Jan Kiszka
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.