Re: cyclictest: Unable to set scheduling policy / join real-time group or run as root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 27, 2013 at 6:22 PM, Hartmut Behrens
<hartmut.behrens@xxxxxxxxx> 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux