Kernel 2.6.25 & Group Scheduling

I recently built the 2.6.25 kernel patched with rt and with Group Scheduling enabled. So, how do you set it up so that a user can run jack in realtime mode? Apparently you have to specify somehow who is allowed to run a process using RR or FIFO scheduling, but I can’t find any documentation on this. Is this rule set up in PAM?

Add a user to the “audio” group
Then edit /etc/security/limits.conf and add something like

rtprio

@audio - rtprio 90
@audio - nice -5
@audio - memlock 500000

memlock is usually set to about half the memory of the machine.
You might need to log out and in again for it to take effect.

No, this I was already aware of that (and already have it configured accordingly)

This is something new introduced in 2.6.25.

I have CONFIG_GROUP_SCHED and CONFIG_RT_GROUP_SCHED enabled. The tasks are grouped by user id: CONFIG_USER_SCHED

Do I need to change it to be grouped by task group? (CONFIG_CGROUP_SCHED) I’ve read that supposedly you have to use a “cgroup” pseudo file system for that and it looked like overkill for a single user system. I’d rather use grouping by userid. :stuck_out_tongue:

I did find /sys/kernel/uids/[uid]/cpu_rt_runtime which is set to 0, but I can’t change it. (I can change cpu_share, but from what I read, that has to do with the size of the CPU slice the UID gets, not setting FIFO or RR scheduling)

There’s a Documentation/sched-rt-group.txt in the kernel source that should provide more info on how to set it up.
Apparently you have to allocate realtime bandwidth and such to users to get it to work.

But, if you don’t really need it, I’d disable those settings and recompile a “normal” RT-kernel.

Yeah, I read that too. That tells about setting up the pseudo file system used to allocate rt to groups. Unfortunately I didn’t find anything in the Documentation telling how to do the same when grouping by UID.

From the documentation it sounds interesting, because not only can you control scheduling priority, but you can also bias how big a time slice a group of processes get.

I will probably have to disable it like you suggest till I find more info on it. (Perhaps I should post this to the rt kernel user mailing list.)

Thanks for the help.