From: Clark Williams <williams@redhat.com>
To: Hartmut Behrens <hartmut.behrens@gmail.com>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
Date: Thu, 28 Feb 2013 09:27:08 -0600 [thread overview]
Message-ID: <20130228092708.7da98c75@riff.lan> (raw)
In-Reply-To: <CA+69FtBGT0NJ5Yh1Qqc9YWh+PuM_p=dng8=ApK1ie4ia0QvPiA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]
On Thu, 28 Feb 2013 17:07:06 +0200
Hartmut Behrens <hartmut.behrens@gmail.com> wrote:
> On Wed, Feb 27, 2013 at 10:00 PM, Clark Williams <williams@redhat.com> wrote:
> > Well this is a new one on me. Some questions:
> >
> > Do you have SELinux running?
>
> No SELinux is disabled
>
> >
> > Are there any files in /etc/security/limits.d other than the one you put
> > there?
> >
> Yes there are:
>
> root@overo:/etc/security# ls -l
> total 40
> -rw-r--r-- 1 root root 4620 Feb 26 2013 access.conf
> -rw-r--r-- 1 root root 3635 Feb 26 2013 group.conf
> -rw-r--r-- 1 root root 1825 Feb 26 2013 limits.conf
> drwxr-xr-x 2 root root 4096 Feb 26 2013 limits.d
> -rw-r--r-- 1 root root 1442 Feb 26 2013 namespace.conf
> drwxr-xr-x 2 root root 4096 Feb 26 2013 namespace.d
> -rwxr-xr-x 1 root root 1020 Feb 26 2013 namespace.init
> -rw-r--r-- 1 root root 2980 Feb 26 2013 pam_env.conf
> -rw-r--r-- 1 root root 2180 Feb 26 2013 time.conf
>
>
> > Other than that I can't think of a reason why sched_setscheduler()
> > would fail as root.
That's /etc/security, I was asking for /etc/security/limits.d.
Since you said that disabling RT_GROUP_SCHED fixed it, I looked at
kernel/sched/core.c and found this block of code in
__sched_setscheduler():
#ifdef CONFIG_RT_GROUP_SCHED
if (user) {
/*
* Do not allow realtime tasks into groups that have no runtime
* assigned.
*/
if (rt_bandwidth_enabled() && rt_policy(policy) &&
task_group(p)->rt_bandwidth.rt_runtime == 0 &&
!task_group_is_autogroup(task_group(p))) {
task_rq_unlock(rq, p, &flags);
return -EPERM;
}
}
#endif
There are plenty of places in __sched_setscheduler() to get punted out
with -EPERM, but this looks likely. My guess is that you have something
going on (or not going on) wrt cgroups and you got kicked out by one of
the above tests.
I think if you look at the RT wiki, it recommends not turning on
RT_GROUP_SCHED for PREEMPT_RT systems (if it doesn't, it *should*).
Clark
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
prev parent reply other threads:[~2013-02-28 15:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 20:03 cyclictest: Unable to set scheduling policy / join real-time group or run as root Hartmut Behrens
2013-02-25 20:55 ` Sven-Thorsten Dietrich
2013-02-25 21:24 ` Hartmut Behrens
2013-02-25 21:35 ` Diego Simak
2013-02-26 8:10 ` Uwe Kleine-König
2013-02-25 21:21 ` Clark Williams
2013-02-27 6:26 ` Hartmut Behrens
2013-02-27 16:09 ` Clark Williams
2013-02-27 16:22 ` Hartmut Behrens
2013-02-27 16:25 ` Hartmut Behrens
2013-02-27 20:00 ` Clark Williams
2013-02-28 15:07 ` Hartmut Behrens
2013-02-28 15:27 ` Clark Williams [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=20130228092708.7da98c75@riff.lan \
--to=williams@redhat.com \
--cc=hartmut.behrens@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox