From a23bf8a396ee7e983c279de8ee5b57686d9f4f3f Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 19 Sep 2005 14:57:05 +0000 Subject: [PATCH] Uncommented description of RLIMIT_NICE that I wrote earlier --- man2/getrlimit.2 | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/man2/getrlimit.2 b/man2/getrlimit.2 index 5826d385e..e81ef4b2c 100644 --- a/man2/getrlimit.2 +++ b/man2/getrlimit.2 @@ -244,23 +244,25 @@ The first addend in the formula, which includes (4 bytes on Linux/x86), ensures that the user cannot create an unlimited number of zero-length messages (such messages nevertheless each consume some system memory for bookkeeping overhead). -.\" FIXME the following commented out, since the off-by-one mismatch -.\" between [gs]etpriority() (40..1) and RLIMIT_NICE (39..0) is likely -.\" to be fixed in 2.6.13 -- MTK, 29 Jul 05 +.\" In kernel 2.6.12, there was an off-by-one mismatch +.\" between [gs]etpriority() (40..1) and RLIMIT_NICE (39..0); +.\" this was fixed in 2.6.13 .\" see http://marc.theaimsgroup.com/?l=linux-kernel&m=112256338703880&w=2 -.\" -.\" .TP -.\" .BR RLIMIT_NICE "(since kernel 2.6.12)" -.\" Specifies a ceiling to which the process nice value can be raised using -.\" .BR setpriority (2) -.\" or -.\" .BR nice (2). -.\" The actual ceiling for the nice value is calculated as -.\" .IR "19\ \-\ rlim_cur" . -.\" (This strangeness occurs because of the differences in user-land -.\" and kernel representations of the nice value, as described in -.\" .BR getpriority (2)). -.\" +.TP +.BR RLIMIT_NICE " (since kernel 2.6.12)" +Specifies a ceiling to which the process nice value can be raised using +.BR setpriority (2) +or +.BR nice (2). +The actual ceiling for the nice value is calculated as +.IR "20\ \-\ rlim_cur" . +(This strangeness occurs because of the differences in user-land +and kernel representations of the nice value, as described in +.BR getpriority (2). +Eventually, glibc might hide things to make the range given to +.BR RLIMIT_NICE +to be the same as +.BR setrlimit (2).) .\" FIXME (28 Jul 05) -- must check later whether glibc hides this issue .\" by performing a calculation similar to "unice == 20 - knice" .\" (like [gs]setpriority()) when dealing with RLIMIT_NICE