LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [Regression] 2.6.24-git9: RT sched mishandles artswrapper (bisected)
Date: Fri, 01 Feb 2008 10:50:58 +0100	[thread overview]
Message-ID: <1201859458.32654.41.camel@lappy> (raw)
In-Reply-To: <1201851896.32654.34.camel@lappy>


On Fri, 2008-02-01 at 08:44 +0100, Peter Zijlstra wrote:
> On Fri, 2008-02-01 at 03:04 +0100, Rafael J. Wysocki wrote:
> > On Friday, 1 of February 2008, Rafael J. Wysocki wrote:
> > > Hi,
> > > 
> > > This is related to the problem I reported earlier this week:
> > > http://lkml.org/lkml/2008/1/30/554
> > > 
> > > Apparently artswrapper, run by KDE in openSUSE 10.3 with a real time priority,
> > > is mishandled by the scheduler.  The problem is that after the user logs out,
> > > artswrapper stays in TASK_RUNNING forever and prevents other tasks from being
> > > scheduled on the CPU occupied by it.  In this state it also breaks suspend and
> > > hibernation (it cannot be frozen).
> > > 
> > > Since the problem is 100% reproducible on my test boxes, I carried out a
> > > bisection which turned out the following commit:
> > > 
> > > commit 6f505b16425a51270058e4a93441fe64de3dd435
> > > Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > > Date:   Fri Jan 25 21:08:30 2008 +0100
> > > 
> > >     sched: rt group scheduling
> > > 
> > > I'm now checking if the problem disappears after reverting this patch (along a
> > > couple of dependent ones).
> > 
> > Yes, it does.
> > 
> > Please let me know what I can do to debug it further.
> 
> It arts run as root, or does it use RLIMIT_RTPRIO to allow users to
> execute realtime tasks?
> 

If the latter, does this help:

diff --git a/kernel/sched.c b/kernel/sched.c
index ba4c880..bb76cbc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4563,6 +4563,15 @@ recheck:
 			return -EPERM;
 	}
 
+#ifdef CONFIG_FAIR_GROUP_SCHED
+	/*
+	 * Do not allow realtime tasks into groups that have no runtime
+	 * assigned.
+	 */
+	if (rt_policy(policy) && task_group(p)->rt_ratio == 0)
+		return -EPERM;
+#endif
+
 	retval = security_task_setscheduler(p, policy, param);
 	if (retval)
 		return retval;



  reply	other threads:[~2008-02-01  9:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01  1:37 Rafael J. Wysocki
2008-02-01  2:04 ` Rafael J. Wysocki
2008-02-01  7:44   ` Peter Zijlstra
2008-02-01  9:50     ` Peter Zijlstra [this message]
2008-02-01 11:50       ` Rafael J. Wysocki
2008-02-01 12:09         ` Peter Zijlstra
2008-02-01 23:39           ` Rafael J. Wysocki
2008-02-05 21:46             ` Dmitry Adamushko
2008-02-06  1:21               ` Rafael J. Wysocki
     [not found] ` <b647ffbd0802060040wbfe16afq4355e8f4f31ab06b@mail.gmail.com>
     [not found]   ` <1202288548.19243.47.camel@lappy>
2008-02-06 18:25     ` Rafael J. Wysocki
2008-02-06 21:43       ` Peter Zijlstra
2008-02-06 21:50         ` Rafael J. Wysocki
2008-02-06 22:01           ` Peter Zijlstra
2008-02-06 22:18             ` Rafael J. Wysocki
2008-02-06 22:34               ` Peter Zijlstra
2008-02-06 23:31                 ` Rafael J. Wysocki
2008-02-06 23:34                   ` Ingo Molnar
2008-02-07 19:53                     ` Rafael J. Wysocki
2008-02-07 21:20                       ` Peter Zijlstra
2008-02-10 12:30                     ` Rafael J. Wysocki

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=1201859458.32654.41.camel@lappy \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    --cc=rostedt@goodmis.org \
    --subject='Re: [Regression] 2.6.24-git9: RT sched mishandles artswrapper (bisected)' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).