All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] How do I increase CPU time limit.
@ 2012-03-20 14:09 Chris Stone
  2012-03-20 14:31 ` Mustafa ÇAMURLI
  2012-03-20 14:43 ` Philippe Gerum
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Stone @ 2012-03-20 14:09 UTC (permalink / raw)
  To: xenomai@xenomai.org

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

I have a thread which uses a lot of CPU and it is receiving a SIGXCPU: Cpu time limit exceeded. Does this message really mean I have exceeded some CPU time limit? If so, how do I increase or disable the CPU time limit? The code that I am running has been working for quite some time under regular Linux and I have just ported it to Xenomai, so I doubt there are any infinite loops in it.

Chris Stone
Senior Software Engineer
Optelian
1 Brewer Hunt Way
Ottawa, Ontario K2K 2B5

Phone: 613-287-2000 x2106

www.optelian.com<http://www.optelian.com>


[-- Attachment #2: Type: text/html, Size: 3509 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] How do I increase CPU time limit.
  2012-03-20 14:09 [Xenomai-help] How do I increase CPU time limit Chris Stone
@ 2012-03-20 14:31 ` Mustafa ÇAMURLI
  2012-03-20 14:43 ` Philippe Gerum
  1 sibling, 0 replies; 4+ messages in thread
From: Mustafa ÇAMURLI @ 2012-03-20 14:31 UTC (permalink / raw)
  To: Chris Stone; +Cc: xenomai@xenomai.org

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

make sure that "cpu time" is unlimited. You can check and change it with
"ulimit" util. Use  "limit -a" to list all about limitations.


On Tue, Mar 20, 2012 at 4:09 PM, Chris Stone <chris.stone@domain.hid>wrote:

>  I have a thread which uses a lot of CPU and it is receiving a SIGXCPU:
> Cpu time limit exceeded. Does this message really mean I have exceeded some
> CPU time limit? If so, how do I increase or disable the CPU time limit? The
> code that I am running has been working for quite some time under regular
> Linux and I have just ported it to Xenomai, so I doubt there are any
> infinite loops in it.****
>
> ** **
>
> *Chris Stone*
>
> Senior Software Engineer****
>
> Optelian****
>
> 1 Brewer Hunt Way****
>
> Ottawa, Ontario K2K 2B5****
>
> ** **
>
> Phone: 613-287-2000 x2106****
>
> ** **
>
> *www.optelian.com*****
>
> ** **
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
>


-- 
MC

[-- Attachment #2: Type: text/html, Size: 2991 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] How do I increase CPU time limit.
  2012-03-20 14:09 [Xenomai-help] How do I increase CPU time limit Chris Stone
  2012-03-20 14:31 ` Mustafa ÇAMURLI
@ 2012-03-20 14:43 ` Philippe Gerum
  2012-03-20 23:40   ` Gilles Chanteperdrix
  1 sibling, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2012-03-20 14:43 UTC (permalink / raw)
  To: Chris Stone; +Cc: xenomai@xenomai.org

On 03/20/2012 03:09 PM, Chris Stone wrote:
> I have a thread which uses a lot of CPU and it is receiving a SIGXCPU:
> Cpu time limit exceeded. Does this message really mean I have exceeded
> some CPU time limit? If so, how do I increase or disable the CPU time
> limit? The code that I am running has been working for quite some time
> under regular Linux and I have just ported it to Xenomai, so I doubt
> there are any infinite loops in it.

This could be the runaway thread detector triggering, after 4s of 
uninterrupted runtime (which is huge, is this intended?). This is a 
debug mechanism Xenomai implements to recover from a runaway thread 
chewing CPU in primary mode, without having to resort to the reset button.
You can either extend the grace period above the default 4s, using 
CONFIG_XENO_OPT_WATCHDOG_TIMEOUT, or disable the watchdog entirely by 
switching off CONFIG_XENO_OPT_WATCHDOG. This said, 4s is really long 
already, so the regular kernel might not cope with even more starvation 
from normal interrupts.

Other explanation would be not time-related. If 
CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX is enabled, any attempt to switch to 
secondary mode while holding a real-time (Xenomai created) mutex in the 
code would trigger such signal, as a warning to point out a priority 
inversion.

>
> *Chris Stone*
>
> Senior Software Engineer
>
> Optelian
>
> 1 Brewer Hunt Way
>
> Ottawa, Ontario K2K 2B5
>
> Phone: 613-287-2000 x2106
>
> _www.optelian.com <http://www.optelian.com>_
>
>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help


-- 
Philippe.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai-help] How do I increase CPU time limit.
  2012-03-20 14:43 ` Philippe Gerum
@ 2012-03-20 23:40   ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2012-03-20 23:40 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai@xenomai.org

On 03/20/2012 03:43 PM, Philippe Gerum wrote:
> On 03/20/2012 03:09 PM, Chris Stone wrote:
>> I have a thread which uses a lot of CPU and it is receiving a SIGXCPU:
>> Cpu time limit exceeded. Does this message really mean I have exceeded
>> some CPU time limit? If so, how do I increase or disable the CPU time
>> limit? The code that I am running has been working for quite some time
>> under regular Linux and I have just ported it to Xenomai, so I doubt
>> there are any infinite loops in it.
> 
> This could be the runaway thread detector triggering, after 4s of 
> uninterrupted runtime (which is huge, is this intended?). This is a 
> debug mechanism Xenomai implements to recover from a runaway thread 
> chewing CPU in primary mode, without having to resort to the reset button.
> You can either extend the grace period above the default 4s, using 
> CONFIG_XENO_OPT_WATCHDOG_TIMEOUT, or disable the watchdog entirely by 
> switching off CONFIG_XENO_OPT_WATCHDOG. This said, 4s is really long 
> already, so the regular kernel might not cope with even more starvation 
> from normal interrupts.
> 
> Other explanation would be not time-related. If 
> CONFIG_XENO_OPT_DEBUG_SYNCH_RELAX is enabled, any attempt to switch to 
> secondary mode while holding a real-time (Xenomai created) mutex in the 
> code would trigger such signal, as a warning to point out a priority 
> inversion.

You may find an example of how to install a SIGXCPU handler and decode
signals sent by xenomai in examples/native/sigdebug.c

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-20 23:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-20 14:09 [Xenomai-help] How do I increase CPU time limit Chris Stone
2012-03-20 14:31 ` Mustafa ÇAMURLI
2012-03-20 14:43 ` Philippe Gerum
2012-03-20 23:40   ` Gilles Chanteperdrix

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.