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] timer-internal consume a lot of cpu
Date: Fri, 23 Jan 2015 17:45:12 +0100	[thread overview]
Message-ID: <54C27A98.7040704@xenomai.org> (raw)
In-Reply-To: <CAMJ=MEe9gngFstwRwz9xzxS0pL_r45iCphs1V=ZMGrfgcQooTQ@mail.gmail.com>

On 12/23/2014 06:36 PM, Ronny Meeus wrote:
> On Thu, Dec 18, 2014 at 6:21 PM, Ronny Meeus <ronny.meeus@gmail.com> wrote:
>>>
>>> That implies you know the prios of the involved threads. Doesn't sound
>>> like a generic solution either.
>>>
>>> Jan
>>>
>>
>> I think Xenomai knows the involved threads.
>>
>> Philippe,
>> is the list of waiting threads not kept in the thread object?
>>
> 
> Philippe,
> any feedback on the discussion from your side?
> 

Since designing over a blatant glibc bug does not make any sense, the
only reasonable option is to work around this issue for Mercury
specifically. Cobalt implements PI-aware condvars properly, with an
additional optimization which makes them pretty efficient, so I don't
see the point in changing for a sub-optimal option, only to fix a long
overdue glibc issue.

I pushed a work around following a brute force approach to the -next
branch, which applies a static temporary boost to the caller about to
signal or wait for a PI-enabled condvar. I won't bother for dynamic
tracking of priorities for this issue, this would introduce nasty races
and would only work for the syncobj abstraction. Besides, if the thread
signaling the condvar is the timer manager, the boost would always take
place anyway.

Hopefully this patch should help fixing the issue on your end.

-- 
Philippe.


      reply	other threads:[~2015-01-23 16:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-07 16:26 [Xenomai] [xenomai-forge] timer-internal consume a lot of cpu Ronny Meeus
2014-12-16 17:36 ` Ronny Meeus
2014-12-16 17:58   ` Philippe Gerum
2014-12-16 19:41     ` Ronny Meeus
2014-12-16 20:07       ` Philippe Gerum
2014-12-18  8:00         ` Ronny Meeus
2014-12-18  9:04           ` Jan Kiszka
2014-12-18 12:28             ` Ronny Meeus
2014-12-18 13:35               ` Jan Kiszka
2014-12-18 14:17                 ` Ronny Meeus
2014-12-18 14:12               ` Gilles Chanteperdrix
2014-12-18 14:58                 ` Jan Kiszka
2014-12-18 15:04                   ` Gilles Chanteperdrix
2014-12-18 15:25                     ` Ronny Meeus
2014-12-18 15:30                       ` Gilles Chanteperdrix
2014-12-18 15:35                         ` Jan Kiszka
2014-12-18 15:49                           ` Ronny Meeus
2014-12-18 16:06                             ` Jan Kiszka
2014-12-18 17:21                               ` Ronny Meeus
2014-12-23 17:36                                 ` Ronny Meeus
2015-01-23 16:45                                   ` Philippe Gerum [this message]

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=54C27A98.7040704@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.