public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
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: Mon, 25 Feb 2013 15:21:22 -0600	[thread overview]
Message-ID: <20130225152122.49c408ec@riff.lan> (raw)
In-Reply-To: <CA+69FtA6iP5Zer6ENWSgp8uyUc9OQv00JEV6ihz=SihRyEExJw@mail.gmail.com>

[-- 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 --]

  parent reply	other threads:[~2013-02-25 22:01 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 [this message]
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

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=20130225152122.49c408ec@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