=Comment: #0================================================= Darren V. Hart <dvhltc.com> - The nice value specified for the realtime group in limits.conf (R2, SLERT) and limits.d/realtime.conf (MRG) is set to 40, but the range is -19 to 20. The line should instead read: @realtime - nice -20 With this change, ulimit properly reports the new privilege: $ ulimit -e -r scheduling priority (-e) 39 real-time priority (-r) 100 Without it: $ ulimit -e -r scheduling priority (-e) 0 real-time priority (-r) 100 =Comment: #1================================================= Darren V. Hart <dvhltc.com> - Correct the nice limits.conf value This patch applies to the R2 build system. A similar trivial patch would be needed for MRG and SLERT, although they can probably just make the change directly given the trivial nature of the change. =Comment: #3================================================= Darren V. Hart <dvhltc.com> - Note, this bug also needs to be cloned and mirrored to each of MRG and SLERT. =Comment: #4================================================= Darren V. Hart <dvhltc.com> - Marking bug as submitted. When the R2 branch reopens, we'll need to commit this.
Created attachment 328445 [details] Correct the nice limits.conf value
------- Comment From sripathik.com 2009-06-29 09:07 EDT------- To RH: Have you looked at this bug?
Regarding comment 0 The nice range is from -20 to 19 of course. When you use the getrlimit and setrlimit calls, the nice value is 20 - rlim_cur, so these calls take rlim_cur values from 1 to 40, which is also what ulimit reports. Either someone mistakenly thought that limits.conf (or limits.d/realtime.conf) takes the rlim_cur value instead of the nice value, or historically it did work this way. I have tested on a newer machine, and it should be set with the actual nice value so this should be applied to MRG 1.2 I'm waiting for access to an MRG 1.1 machine (or dvhart will test) before saying whether it is applicable there too.
Ok, dvhart verified that this should apply to MRG 1.1 too <dvhart> Per John Kacur's request, here's the results from a RHEL5.2 + MRG 1.1 system: <dvhart> [root@elm9m101 ~]# uname -r <dvhart> 2.6.24.7-117.el5rt <dvhart> [root@elm9m101 ~]# cat /etc/security/limits.d/realtime.conf <dvhart> # This file specifies reasonable default limits for users <dvhart> # who should be able to run realtime processes. <dvhart> # <dvhart> # Such users must be added to group 'realtime' to be <dvhart> # affected by these limits. <dvhart> @realtime soft cpu unlimited <dvhart> @realtime - rtprio 100 <dvhart> @realtime - nice 40 <dvhart> @realtime - memlock unlimited <dvhart> [root@elm9m101 ~]# su - rtuser <dvhart> [rtuser@elm9m101 ~]$ groups <dvhart> rtuser wheel realtime <dvhart> [rtuser@elm9m101 ~]$ ulimit -e -r <dvhart> scheduling priority (-e) 0 <dvhart> real-time priority (-r) 100
------- Comment From dvhltc.com 2009-06-29 13:56 EDT------- Per John Kacur's request, here's the results from a RHEL5.2 + MRG 1.1 system: [root@elm9m101 ~]# uname -r 2.6.24.7-117.el5rt [root@elm9m101 ~]# cat /etc/security/limits.d/realtime.conf # This file specifies reasonable default limits for users # who should be able to run realtime processes. # # Such users must be added to group 'realtime' to be # affected by these limits. @realtime soft cpu unlimited @realtime - rtprio 100 @realtime - nice 40 @realtime - memlock unlimited [root@elm9m101 ~]# su - rtuser [rtuser@elm9m101 ~]$ groups rtuser wheel realtime [rtuser@elm9m101 ~]$ ulimit -e -r scheduling priority (-e) 0 real-time priority (-r) 100
I applied the following patch --- devel/realtime.conf 1 Aug 2007 18:25:59 -0000 1.1 +++ devel/realtime.conf 29 Jun 2009 18:05:59 -0000 1.2 @@ -6,5 +6,5 @@ @realtime soft cpu unlimited @realtime - rtprio 100 -@realtime - nice 40 +@realtime - nice -20 @realtime - memlock unlimited to devel/realtime.conf RHEL-5-RT/realtime.conf RHEL-5-RT-V1/realtime.conf for rt-setup in CVS and commited it
Verified. Installed current version (rt-setup-1.1-6.el5rt), which had these values in /etc/security/limit.d/realtime.conf: ---------------------------------------------------------------- @realtime soft cpu unlimited @realtime - rtprio 100 @realtime - nice 40 @realtime - memlock unlimited ---------------------------------------------------------------- Upgraded to the new version, 1.4-1.el5rt and the new values are: ---------------------------------------------------------------- @realtime soft cpu unlimited @realtime - rtprio 100 @realtime - nice -20 @realtime - memlock unlimited ----------------------------------------------------------------
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1170.html