All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Ronny Meeus <ronny.meeus@gmail.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Xenomai-forge: thread using 100% cpu load
Date: Wed, 06 Mar 2013 14:49:32 +0100	[thread overview]
Message-ID: <5137496C.4090908@xenomai.org> (raw)
In-Reply-To: <CAMJ=MEdAfvwWhjc4SLPk5smh+vNbPDJP=kM3bBFdw6n3bJd_mg@mail.gmail.com>

On 03/02/2013 12:13 PM, Ronny Meeus wrote:

> An update on the investigation:
> I was able to make this issue disappear by changing the timeout value
> of the smallest timers we use.
> We use a couple of timers with a timeout of 25ms. By enlarging these
> to 25sec and the problem is gone.
>
> Yesterday I was also able to see (using the"strace" tool) the process
> executing constantly "clone" system calls.
> Note that the process we use is large (2Gb) and uses an mlockall call.
>
> In http://stackoverflow.com/questions/4263958/some-information-on-timer-helper-thread-of-librt-so-1/4935895#4935895
> I see that a new thread is created when the timer_create is called for
> the first time. This thread stays alive until the program exits and is
> used to process the timer expiries.

Looking at the code, glibc 2.9 not only forks one helper thread once, 
but also creates a dedicated short-lived thread for running the user 
handler at each timer expiration. This implementation is still current 
with 2.15. Which makes quite too many clones out there for my taste.

-- 
Philippe.


  parent reply	other threads:[~2013-03-06 13:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 19:19 [Xenomai] Xenomai-forge: thread using 100% cpu load Ronny Meeus
2013-02-28 20:10 ` Gilles Chanteperdrix
2013-02-28 20:22   ` Thomas De Schampheleire
2013-02-28 20:27     ` Gilles Chanteperdrix
2013-03-01  8:22     ` Philippe Gerum
2013-03-01  8:26       ` Gilles Chanteperdrix
2013-03-01  8:30         ` Philippe Gerum
2013-03-01  8:30           ` Gilles Chanteperdrix
2013-03-01  8:41             ` Philippe Gerum
2013-03-02 11:13               ` Ronny Meeus
2013-03-05 12:43                 ` Ronny Meeus
2013-03-05 13:28                   ` Philippe Gerum
2013-03-05 14:08                   ` Philippe Gerum
2013-03-05 14:25                     ` Ronny Meeus
2013-03-05 14:47                       ` Philippe Gerum
2013-03-05 14:53                         ` Ronny Meeus
2013-03-06 10:55                     ` Ronny Meeus
2013-03-06 11:09                       ` Philippe Gerum
2013-03-06 11:18                         ` Philippe Gerum
2013-03-06 13:24                       ` Philippe Gerum
2013-03-06 13:49                 ` Philippe Gerum [this message]
2013-03-06 14:32                   ` Ronny Meeus
2013-03-06 15:49                     ` Philippe Gerum
2013-03-07 10:02                       ` Ronny Meeus
2013-03-07 10:32                         ` Philippe Gerum
2013-03-07 15:56                           ` Philippe Gerum
2013-03-07 19:51                             ` Ronny Meeus
2013-03-08  7:44                               ` Ronny Meeus
2013-02-28 20:30   ` Ronny Meeus
2013-02-28 20:35     ` 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=5137496C.4090908@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=ronny.meeus@gmail.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.