This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RLIMIT NICE in glibc


Hello Ulrich,

I had no response to the message below?  A slight update: the 
patch I suggested is now in 2.6.14-rc1 (didn't make it 
for 2.6.13).

Do you believe it worthwhile to change the RLIMIT_NICE
behaviour within glibc so that the range is consistent
with the Linux setpriority() system call and the glibc 
wrapper for getpriority()?  (Should I be submitting
this suggestion via another avenue?)

Cheers,

Michael

> --- Ursprüngliche Nachricht ---
> Von: "Michael T Kerrisk" <mtk-lists@gmx.net>
> An: drepper@redhat.com
> Kopie: libc-alpha@sources.redhat.com, Matt Mackall <mpm@selenic.com>,
> michael.kerrisk@gmx.net
> Betreff: RLIMIT NICE in glibc
> Datum: Wed, 17 Aug 2005 14:06:34 +0200 (MEST)
> 
> Ulrich,
> 
> In sysdeps/unix/sysv/linux/bits/resource.h there is nowadays 
> the following:
> 
>      /* Maximum nice priority allowed to raise to.
>         Nice levels 19 .. -20 correspond to 0 .. 39
>         values of this resource limit.  */
>      __RLIMIT_NICE = 13,
>    #define RLIMIT_NICE __RLIMIT_NICE
> 
> After the following report:
> 
> http://marc.theaimsgroup.com/?l=linux-kernel&m=112256338703880&w=2
> 
> there was general agreement that RLIMIT_NICE and [gs]etpriority() 
> should deal with consistent ranges:
> 
> http://marc.theaimsgroup.com/?l=linux-kernel&m=112262779828552&w=2
> http://marc.theaimsgroup.com/?l=linux-kernel&m=112266870621366&w=2
> 
> and the following patch is likely to be applied for 2.6.13:
> 
> http://marc.theaimsgroup.com/?l=linux-kernel&m=112413714425177&w=2
> 
> So the comment in the glibc code should be edited:
> 
>      s/0 .. 39/1 .. 40/
> 
> However, I have a more general suggestion: would it be
> sensible to have glibc's wrappers for setrlimit()/getrlimit() 
> include extra code to handle RLIMIT_NICE so that callers 
> would get/set values in the range +19 .. -20 for this limit?
> This would be consistent with the +19 .. -20 range that is 
> exposed in user-space by the Linux setpriority() system call 
> and the glibc wrapper for getpriority().
> 
> Cheers,
> 
> Michael

-- 
Michael Kerrisk
mtk-lists@gmx.net

GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]