* cyclictest: Unable to set scheduling policy / join real-time group or run as root
@ 2013-02-25 20:03 Hartmut Behrens
2013-02-25 20:55 ` Sven-Thorsten Dietrich
2013-02-25 21:21 ` Clark Williams
0 siblings, 2 replies; 13+ messages in thread
From: Hartmut Behrens @ 2013-02-25 20:03 UTC (permalink / raw)
To: linux-rt-users
Dear RT Folks,
After successfully patching a 3.2 kernel (gumstix platform) with
patch-3.2-rt10, I obtained the rt-tests suite from
git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
I enabled CONFIG_PREEMPT_RT in menuconfig and disabled "CPU frequency scaling".
Compilation of rt-tests ("make all") on the platform is also successful.
When trying to execute cyclictest, the program reports: "Unable to
change scheduling policy! either run as root or join realtime group"
Looking in rt-utils.c, it appears that set_scheduler is unable to
select SCHED_FIFO scheduling policy.
Do you have any hints on how to fix this problem, or at least narrow
it down further? Could it
Best Regards,
Hartmut Behrens
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
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:21 ` Clark Williams
1 sibling, 1 reply; 13+ messages in thread
From: Sven-Thorsten Dietrich @ 2013-02-25 20:55 UTC (permalink / raw)
To: Hartmut Behrens; +Cc: linux-rt-users
On Feb 25, 2013, at 12:03 PM, Hartmut Behrens <hartmut.behrens@gmail.com> wrote:
> Dear RT Folks,
>
> After successfully patching a 3.2 kernel (gumstix platform) with
> patch-3.2-rt10, I obtained the rt-tests suite from
> git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
>
> I enabled CONFIG_PREEMPT_RT in menuconfig and disabled "CPU frequency scaling".
>
> Compilation of rt-tests ("make all") on the platform is also successful.
>
> When trying to execute cyclictest, the program reports: "Unable to
> change scheduling policy! either run as root or join realtime group"
>
> Looking in rt-utils.c, it appears that set_scheduler is unable to
> select SCHED_FIFO scheduling policy.
>
> Do you have any hints on how to fix this problem, or at least narrow
> it down further? Could it
>
Does "either run as root or join realtime group" fix the problem?
Sven
> Best Regards,
> Hartmut Behrens
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
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
0 siblings, 2 replies; 13+ messages in thread
From: Hartmut Behrens @ 2013-02-25 21:24 UTC (permalink / raw)
To: Sven-Thorsten Dietrich; +Cc: linux-rt-users
No, neither of these work (realtime groupnames that were tried:
realtime / rtprio)
This might be related:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619938 but I have yet
to dig into the details.
Are there perhaps any other suggestions?
Best Regards,
Hartmut
On Mon, Feb 25, 2013 at 10:55 PM, Sven-Thorsten Dietrich
<sven@thebigcorporation.com> wrote:
>
> On Feb 25, 2013, at 12:03 PM, Hartmut Behrens <hartmut.behrens@gmail.com> wrote:
>
>> Dear RT Folks,
>>
>> After successfully patching a 3.2 kernel (gumstix platform) with
>> patch-3.2-rt10, I obtained the rt-tests suite from
>> git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
>>
>> I enabled CONFIG_PREEMPT_RT in menuconfig and disabled "CPU frequency scaling".
>>
>> Compilation of rt-tests ("make all") on the platform is also successful.
>>
>> When trying to execute cyclictest, the program reports: "Unable to
>> change scheduling policy! either run as root or join realtime group"
>>
>> Looking in rt-utils.c, it appears that set_scheduler is unable to
>> select SCHED_FIFO scheduling policy.
>>
>> Do you have any hints on how to fix this problem, or at least narrow
>> it down further? Could it
>>
>
> Does "either run as root or join realtime group" fix the problem?
>
> Sven
>
>> Best Regards,
>> Hartmut Behrens
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
2013-02-25 21:24 ` Hartmut Behrens
@ 2013-02-25 21:35 ` Diego Simak
2013-02-26 8:10 ` Uwe Kleine-König
1 sibling, 0 replies; 13+ messages in thread
From: Diego Simak @ 2013-02-25 21:35 UTC (permalink / raw)
To: Hartmut Behrens; +Cc: Sven-Thorsten Dietrich, linux-rt-users
2013/2/25 Hartmut Behrens <hartmut.behrens@gmail.com>
>
> No, neither of these work (realtime groupnames that were tried:
> realtime / rtprio)
>
> This might be related:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619938 but I have yet
> to dig into the details.
>
> Are there perhaps any other suggestions?
>
> Best Regards,
>
> Hartmut
>
> On Mon, Feb 25, 2013 at 10:55 PM, Sven-Thorsten Dietrich
> <sven@thebigcorporation.com> wrote:
> >
> > On Feb 25, 2013, at 12:03 PM, Hartmut Behrens <hartmut.behrens@gmail.com> wrote:
> >
> >> Dear RT Folks,
> >>
> >> After successfully patching a 3.2 kernel (gumstix platform) with
> >> patch-3.2-rt10, I obtained the rt-tests suite from
> >> git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
> >>
> >> I enabled CONFIG_PREEMPT_RT in menuconfig and disabled "CPU frequency scaling".
> >>
> >> Compilation of rt-tests ("make all") on the platform is also successful.
> >>
> >> When trying to execute cyclictest, the program reports: "Unable to
> >> change scheduling policy! either run as root or join realtime group"
> >>
> >> Looking in rt-utils.c, it appears that set_scheduler is unable to
> >> select SCHED_FIFO scheduling policy.
> >>
> >> Do you have any hints on how to fix this problem, or at least narrow
> >> it down further? Could it
> >>
> >
> > Does "either run as root or join realtime group" fix the problem?
> >
> > Sven
> >
> >> Best Regards,
> >> Hartmut Behrens
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Try add yourself to a group that allows changing scheduling policy.
Check the following link to know how to do this (I'm from the audio world)
http://www.jackaudio.org/linux_rt_config
hth
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
2013-02-25 21:24 ` Hartmut Behrens
2013-02-25 21:35 ` Diego Simak
@ 2013-02-26 8:10 ` Uwe Kleine-König
1 sibling, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2013-02-26 8:10 UTC (permalink / raw)
To: Hartmut Behrens; +Cc: Sven-Thorsten Dietrich, linux-rt-users
Hello,
On Mon, Feb 25, 2013 at 11:24:05PM +0200, Hartmut Behrens wrote:
> No, neither of these work (realtime groupnames that were tried:
> realtime / rtprio)
>
> This might be related:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619938 but I have yet
> to dig into the details.
That is not the problem. If you didn't fiddle with your pam config
running as root should work. You can add such a group by following
Clark's suggestion.
Do you run a vanilla Debian system? I guess the kernel was created by
you as I'm not aware that Debian's kernel support gumstix. Can you
provide your .config in that case?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
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:21 ` Clark Williams
2013-02-27 6:26 ` Hartmut Behrens
1 sibling, 1 reply; 13+ messages in thread
From: Clark Williams @ 2013-02-25 21:21 UTC (permalink / raw)
To: Hartmut Behrens; +Cc: linux-rt-users
[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]
On Mon, 25 Feb 2013 22:03:06 +0200
Hartmut Behrens <hartmut.behrens@gmail.com> wrote:
> Dear RT Folks,
>
> After successfully patching a 3.2 kernel (gumstix platform) with
> patch-3.2-rt10, I obtained the rt-tests suite from
> git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git
>
> I enabled CONFIG_PREEMPT_RT in menuconfig and disabled "CPU frequency scaling".
>
> Compilation of rt-tests ("make all") on the platform is also successful.
>
> When trying to execute cyclictest, the program reports: "Unable to
> change scheduling policy! either run as root or join realtime group"
>
> Looking in rt-utils.c, it appears that set_scheduler is unable to
> select SCHED_FIFO scheduling policy.
>
> Do you have any hints on how to fix this problem, or at least narrow
> it down further? Could it
>
> Best Regards,
> Hartmut Behrens
> --
>
Changing your scheduling policy requires extra privileges. You can
either run cyclictest as root, or if your distribution uses PAM, you
can set up a file in /etc/security/limits.d which enable group access to
changing scheduler policy. You can name the file whatever you want, I
usually call mine 99-realtime.conf:
# cat <<EOF >/etc/security/limits.d/99-realtime.conf
@realtime - rtprio 99
@realtime - memlock unlimited
EOF
Then create a group named realtime and add your username to the newly
created group:
# groupadd realtime
# usermod -a -G realtime yourUserID
Log out, then log back in and you should be able to verift that you're
in the realtime group using the 'groups' command. Once you're username
is a member of the realtime group, you should be able to run cyclictest
without being root.
Clark
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
2013-02-25 21:21 ` Clark Williams
@ 2013-02-27 6:26 ` Hartmut Behrens
2013-02-27 16:09 ` Clark Williams
0 siblings, 1 reply; 13+ messages in thread
From: Hartmut Behrens @ 2013-02-27 6:26 UTC (permalink / raw)
To: Clark Williams; +Cc: linux-rt-users
On Mon, Feb 25, 2013 at 11:21 PM, Clark Williams <williams@redhat.com> wrote:
> Changing your scheduling policy requires extra privileges. You can
> either run cyclictest as root, or if your distribution uses PAM, you
> can set up a file in /etc/security/limits.d which enable group access to
> changing scheduler policy. You can name the file whatever you want, I
> usually call mine 99-realtime.conf:
>
> # cat <<EOF >/etc/security/limits.d/99-realtime.conf
> @realtime - rtprio 99
> @realtime - memlock unlimited
> EOF
>
> Then create a group named realtime and add your username to the newly
> created group:
>
> # groupadd realtime
> # usermod -a -G realtime yourUserID
>
> Log out, then log back in and you should be able to verift that you're
> in the realtime group using the 'groups' command. Once you're username
> is a member of the realtime group, you should be able to run cyclictest
> without being root.
This problem persists even when I run cyclictest as root. I have also
set up PAM as described above and added root to the realtime group
without any success.
I have also tried "sudo ./cyclictest" and " su -c './cyclictest'
Is this perhaps a more fundamental problem?
Just to recap: I applied the patch-3.2-rt10 patch cleanly to a v3.2
kernel customized for a TI OMAP (ARM) processor. CONFIG_PREEMPT_RT was
enabled and CPU frequency scaling disabled.
HB
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
2013-02-27 6:26 ` Hartmut Behrens
@ 2013-02-27 16:09 ` Clark Williams
2013-02-27 16:22 ` Hartmut Behrens
0 siblings, 1 reply; 13+ messages in thread
From: Clark Williams @ 2013-02-27 16:09 UTC (permalink / raw)
To: Hartmut Behrens; +Cc: linux-rt-users
[-- Attachment #1: Type: text/plain, Size: 2302 bytes --]
On Wed, 27 Feb 2013 08:26:45 +0200
Hartmut Behrens <hartmut.behrens@gmail.com> wrote:
> On Mon, Feb 25, 2013 at 11:21 PM, Clark Williams <williams@redhat.com> wrote:
> > Changing your scheduling policy requires extra privileges. You can
> > either run cyclictest as root, or if your distribution uses PAM, you
> > can set up a file in /etc/security/limits.d which enable group access to
> > changing scheduler policy. You can name the file whatever you want, I
> > usually call mine 99-realtime.conf:
> >
> > # cat <<EOF >/etc/security/limits.d/99-realtime.conf
> > @realtime - rtprio 99
> > @realtime - memlock unlimited
> > EOF
> >
> > Then create a group named realtime and add your username to the newly
> > created group:
> >
> > # groupadd realtime
> > # usermod -a -G realtime yourUserID
> >
> > Log out, then log back in and you should be able to verift that you're
> > in the realtime group using the 'groups' command. Once you're username
> > is a member of the realtime group, you should be able to run cyclictest
> > without being root.
>
> This problem persists even when I run cyclictest as root. I have also
> set up PAM as described above and added root to the realtime group
> without any success.
> I have also tried "sudo ./cyclictest" and " su -c './cyclictest'
>
> Is this perhaps a more fundamental problem?
>
> Just to recap: I applied the patch-3.2-rt10 patch cleanly to a v3.2
> kernel customized for a TI OMAP (ARM) processor. CONFIG_PREEMPT_RT was
> enabled and CPU frequency scaling disabled.
>
This shouldn't have anything to do with the PREEMPT_RT patchset.
Changing scheduling policy via the sched_setscheduler(2) syscall is a
fundamental component of the Linux scheduler.
What happens if you compile and run this program on your kernel?
#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
#include <errno.h>
#include <memory.h>
int main(int argc, char **argv)
{
int ret;
struct sched_param s;
memset(&s, 0, sizeof(s));
s.sched_priority = 1;
if ((sched_setscheduler(0, SCHED_FIFO, &s))) {
fprintf(stderr, "error changing policy: %s\n", strerror(errno));
exit(errno);
}
printf("successfully changed policy to SCHED_FIFO priority 1\n");
exit(0);
}
Clark
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
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
0 siblings, 2 replies; 13+ messages in thread
From: Hartmut Behrens @ 2013-02-27 16:22 UTC (permalink / raw)
To: Clark Williams; +Cc: linux-rt-users
On Wed, Feb 27, 2013 at 6:09 PM, Clark Williams <williams@redhat.com> wrote:
> What happens if you compile and run this program on your kernel?
> #include <stdio.h>
> #include <stdlib.h>
> #include <sched.h>
> #include <errno.h>
> #include <memory.h>
>
> int main(int argc, char **argv)
> {
> int ret;
> struct sched_param s;
>
> memset(&s, 0, sizeof(s));
> s.sched_priority = 1;
> if ((sched_setscheduler(0, SCHED_FIFO, &s))) {
> fprintf(stderr, "error changing policy: %s\n", strerror(errno));
> exit(errno);
> }
> printf("successfully changed policy to SCHED_FIFO priority 1\n");
> exit(0);
> }
When I run it as root I get "error changing policy: Operation not permitted".
Does this mean that some hard limits are not correctly set for root?
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
2013-02-27 16:22 ` Hartmut Behrens
@ 2013-02-27 16:25 ` Hartmut Behrens
2013-02-27 20:00 ` Clark Williams
1 sibling, 0 replies; 13+ messages in thread
From: Hartmut Behrens @ 2013-02-27 16:25 UTC (permalink / raw)
To: Clark Williams; +Cc: linux-rt-users
On Wed, Feb 27, 2013 at 6:22 PM, Hartmut Behrens
<hartmut.behrens@gmail.com> wrote:
>> What happens if you compile and run this program on your kernel?
>> #include <stdio.h>
>> #include <stdlib.h>
>> #include <sched.h>
>> #include <errno.h>
>> #include <memory.h>
>>
>> int main(int argc, char **argv)
>> {
>> int ret;
>> struct sched_param s;
>>
>> memset(&s, 0, sizeof(s));
>> s.sched_priority = 1;
>> if ((sched_setscheduler(0, SCHED_FIFO, &s))) {
>> fprintf(stderr, "error changing policy: %s\n", strerror(errno));
>> exit(errno);
>> }
>> printf("successfully changed policy to SCHED_FIFO priority 1\n");
>> exit(0);
>> }
>
> When I run it as root I get "error changing policy: Operation not permitted".
>
> Does this mean that some hard limits are not correctly set for root?
Could a fix be to switch off CONFIG_RT_GROUP_SCHED ?
(http://www.kernel.org/doc/Documentation/scheduler/sched-rt-group.txt)
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
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
1 sibling, 1 reply; 13+ messages in thread
From: Clark Williams @ 2013-02-27 20:00 UTC (permalink / raw)
To: Hartmut Behrens; +Cc: linux-rt-users
[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]
On Wed, 27 Feb 2013 18:22:20 +0200
Hartmut Behrens <hartmut.behrens@gmail.com> wrote:
> On Wed, Feb 27, 2013 at 6:09 PM, Clark Williams <williams@redhat.com> wrote:
> > What happens if you compile and run this program on your kernel?
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <sched.h>
> > #include <errno.h>
> > #include <memory.h>
> >
> > int main(int argc, char **argv)
> > {
> > int ret;
> > struct sched_param s;
> >
> > memset(&s, 0, sizeof(s));
> > s.sched_priority = 1;
> > if ((sched_setscheduler(0, SCHED_FIFO, &s))) {
> > fprintf(stderr, "error changing policy: %s\n", strerror(errno));
> > exit(errno);
> > }
> > printf("successfully changed policy to SCHED_FIFO priority 1\n");
> > exit(0);
> > }
>
> When I run it as root I get "error changing policy: Operation not permitted".
>
> Does this mean that some hard limits are not correctly set for root?
Well this is a new one on me. Some questions:
Do you have SELinux running?
Are there any files in /etc/security/limits.d other than the one you put
there?
Other than that I can't think of a reason why sched_setscheduler()
would fail as root.
Clark
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
2013-02-27 20:00 ` Clark Williams
@ 2013-02-28 15:07 ` Hartmut Behrens
2013-02-28 15:27 ` Clark Williams
0 siblings, 1 reply; 13+ messages in thread
From: Hartmut Behrens @ 2013-02-28 15:07 UTC (permalink / raw)
To: Clark Williams; +Cc: linux-rt-users
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root
2013-02-28 15:07 ` Hartmut Behrens
@ 2013-02-28 15:27 ` Clark Williams
0 siblings, 0 replies; 13+ messages in thread
From: Clark Williams @ 2013-02-28 15:27 UTC (permalink / raw)
To: Hartmut Behrens; +Cc: linux-rt-users
[-- 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 --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-02-28 15:27 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox