All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Blechmann <tim@klingt.org>
To: linux-rt-users@vger.kernel.org
Subject: Re: possible problem with sem_post
Date: Mon, 13 Feb 2012 20:38:12 +0100	[thread overview]
Message-ID: <jhbor4$ngh$1@dough.gmane.org> (raw)
In-Reply-To: 201202131342.q1DDgG7p001794@klingt.org

> i am experiencing a strange issue with lockups of my application. have
> multiple high-priority real-time threads (as many threads as there are
> physical cpus) and one of the threads seems to lock inside sem_post(). these
> lookups only occur very rarely, after stressing the application (and the
> semaphore) for a rather long time.
> 
> sem_post seems to call sys_futex with FUTEX_WAKE. this issue only occurred
> recently after installing the 3.0 rt kernel (currently 3.0.20-rt35). but
> haven't seen this behavior on any non-rt kernel (currently running another
> stress-test). the machine is a thinkpad t410, x86_64.
> 
> if this is a problem of the rt-kernel, is there any way to debug it? or is it
> in general unsafe to call sem_post from real-time threads?

ok, i ran the same test on a stock ubuntu kernel for a few hours without any 
problem.

the situation: 2 cpus, 2 high-priority SCHED_FIFO threads. several low-priority 
threads, one of them waiting for a semaphore, that is posted by the rt threads. 
my guess is that the low-priority thread acquires a spinlock but then gets 
preempted, but the high-priority thread waits for this spinlock ... is this 
possible?

thanks, tim



  reply	other threads:[~2012-02-13 19:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13 13:42 possible problem with sem_post Tim Blechmann
2012-02-13 19:38 ` Tim Blechmann [this message]
2012-02-14 18:51   ` Tim Blechmann

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='jhbor4$ngh$1@dough.gmane.org' \
    --to=tim@klingt.org \
    --cc=linux-rt-users@vger.kernel.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.