public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Paul Davis <paul@linuxaudiosystems.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.X, NPTL, SCHED_FIFO and JACK
Date: Wed, 30 Jun 2004 17:04:30 +0200	[thread overview]
Message-ID: <20040630150430.GA28506@elte.hu> (raw)
In-Reply-To: <200406301341.i5UDfkKX010518@localhost.localdomain>


* Paul Davis <paul@linuxaudiosystems.com> wrote:

> The first and most visible issue is with inheritance of SCHED_FIFO
> scheduling. Although there are other mechanisms available under 2.6,
> many people use the "jackstart" helper application which runs setuid
> root and uses capabilities to start up JACK with the required caps to
> allow use of SCHED_FIFO and mlockall(). This has worked very well in
> 2.4 for about 2 years, but in 2.6 JACK fails to get its threads to be
> in the SCHED_FIFO scheduling class without a bunch of nasty kludges.
> 
> Things work correctly as soon as LD_ASSUME_KERNEL is used. 

A simple "strace -f" should show whether the setscheduler() call
succeeds or not. Does 'jackstart' do anything with glibc internals?

> We also see apparently impossible thread scheduling, where a thread
> that should run immediately is delayed by a significant time, and the
> thread that woke the first one up (and should be waiting for it to
> execute) runs again, apparently without ever having blocked. Once
> more, it all works correctly is LD_ASSUME_KERNEL is used to avoid
> NPTL.

there was a SCHED_FIFO bug in all 2.6 kernels prior 2.6.5, causing
erratic scheduling. Have you tried 2.6.6 or 2.6.7?

> Are there known issues with the implementation of NPTL that might give
> rise to this behaviour? What can we do to help understand and debug
> it?

there's nothing special about NPTL, scheduling-wise. But if SCHED_FIFO
is not properly set for all JACK threads that could explain the
symptoms. You talked about kludges that are necessary to make all
threads SCHED_FIFO - are you 100% sure that all JACK threads are indeed
SCHED_FIFO after these kludges are applied? If yes and you are running a
later kernel then it's something new and probably NPTL-unrelated.

	Ingo

  reply	other threads:[~2004-06-30 15:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30 13:41 2.6.X, NPTL, SCHED_FIFO and JACK Paul Davis
2004-06-30 15:04 ` Ingo Molnar [this message]
2004-06-30 15:18   ` Ingo Molnar
2004-06-30 15:26   ` Jakub Jelinek
2004-06-30 16:32     ` Paul Davis
2004-06-30 16:57       ` Jakub Jelinek
2004-06-30 17:52         ` Paul Davis
2004-06-30 15:05 ` Ingo Molnar
2004-06-30 16:12   ` Paul Davis
2004-06-30 17:07     ` Ulrich Drepper
2004-06-30 17:50       ` Paul Davis
2004-07-01 18:03 ` Matt Mackall
2004-07-01 18:14   ` William Lee Irwin III
2004-07-01 22:45     ` Andrew Morton
2004-07-02  0:45       ` William Lee Irwin III
2004-07-02  1:38         ` Peter Williams
2004-07-02  2:53           ` William Lee Irwin III
2004-07-02  3:03         ` Con Kolivas
2004-07-02  3:05           ` William Lee Irwin III
2004-07-02  3:27     ` Paul Davis
2004-07-02  7:37       ` William Lee Irwin III
2004-07-02 10:40         ` Takashi Iwai
2004-07-06  0:48           ` Peter Williams
2004-07-02 14:42         ` Paul Davis

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=20040630150430.GA28506@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@linuxaudiosystems.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox