All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel van Mierlo <marcel.vanmierlo@marel.com>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] High CPU load using q_send under pSOS skin
Date: Thu, 6 Feb 2014 16:57:36 +0000	[thread overview]
Message-ID: <52F3BF00.3010405@marel.com> (raw)
In-Reply-To: <52F3B9D2.9070205@xenomai.org>

Hi Gilles, I appreciate the input:

By observation, it is 100ms (using a trace function it looks nice and 
stable):

common_io.c cio_watchdog_kick +280 036.726273s: "WAKING"
common_io.c cio_watchdog_kick +280 036.826273s: "WAKING"
common_io.c cio_watchdog_kick +280 036.926272s: "WAKING"
common_io.c cio_watchdog_kick +280 037.026272s: "WAKING"
common_io.c cio_watchdog_kick +280 037.126272s: "WAKING"

so I am confident it is running at 100ms. The pSOS documentation refers 
to kc_ticks2sec to verify frequency, but I am not sure where to look 
under Xenomai to double check...not sure if this is relevant from 
.config, but anyway the trace comes every 100ms.

/CONFIG_XENO_OPT_TIMING_VIRTICK/=1000.

Marcel.


On 06/02/14 16:35, Gilles Chanteperdrix wrote:
> On 02/06/2014 05:25 PM, Marcel van Mierlo wrote:
>> Hi,
>>
>> I've been investigating this for a couple of days and would really
>> appreciate some insight
>> on what might be going on or what I can do to progress this...
>>
>> I am porting a legacy pSOS application - to Xenomai on BeagleBoard Black
>> 3.8 kernel
>> and have noticed %CPU (via. top) of MAIN around 40% when using q_send,
>> and doing no "work".
>>
>> Surprisingly,  if I add a printf() and fflush() to the task body then
>> the CPU drops down to < 1%.
>>
>> I've checked compile options, nothing obviously wrong. Here is the
>> (abridged) body of the task.
>> It just provides a periodic message for watchdog purposes.
>>
>>
>> [%CPU ~%40]
>> while{1}
>> {
>>       q_send(ulCanTQid, (INT32 *)&oCanMsg);
>>       tm_wkafter(100);  // ~100ms
>
> Have you checked that the comment is right? Are you sure you are not 
> sleeping 100ns ?
>


  reply	other threads:[~2014-02-06 16:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-06 16:25 [Xenomai] High CPU load using q_send under pSOS skin Marcel van Mierlo
2014-02-06 16:35 ` Gilles Chanteperdrix
2014-02-06 16:57   ` Marcel van Mierlo [this message]
2014-02-06 17:26 ` Philippe Gerum
2014-02-06 17:28   ` Philippe Gerum
2014-02-06 19:00   ` Gilles Chanteperdrix
2014-02-07  8:53     ` Philippe Gerum
2014-02-07 13:32       ` Marcel van Mierlo
2014-02-07 13:57         ` Philippe Gerum
2014-02-07 14:03         ` Philippe Gerum
2014-02-07 14:06         ` Philippe Gerum
2014-02-07 14:32           ` Marcel van Mierlo
2014-02-07 14:38             ` Gilles Chanteperdrix
2014-02-07 15:07               ` Marcel van Mierlo
2014-02-07 15:10                 ` Gilles Chanteperdrix
2014-02-07 15:22                   ` Marcel van Mierlo
2014-02-07 19:23                     ` Gilles Chanteperdrix
2014-02-07 14:08         ` Gilles Chanteperdrix

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=52F3BF00.3010405@marel.com \
    --to=marcel.vanmierlo@marel.com \
    --cc=gilles.chanteperdrix@xenomai.org \
    --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.