bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Coreutils nice sanity check failure


From: Soeren D. Schulze
Subject: Coreutils nice sanity check failure
Date: Sun, 17 Apr 2005 00:05:53 +0200

Hi everyone,

after running the test script myself and thinking I a bit, I found the
reason why it fails:

Coreutils nice expects a priority range from 0 to 39 (mapped to -20..19
for the user) but Mach only provides 0..31.  The POSIX layer in libc now
attempts to convert these values to the respective ranges, but because
Mach does not provide the full range, it has to divide by 2 and
therefore loses accuracy:  Odd values are rounded down to even, which
is, of course, a behavior that the test doesn't like.

My proposal is to change the mapping policy and map 0..39 to 0..31
discarding the 8 lowest possible priorites.  Priorities below the
default priority (0 to the user) do not work properly anyway right now.
Once they work, it will not hurt too badly if the range is only partly
accessible.

Changing the conversion algorithm would be a trivial patch.

On IRC, Neal had come up with another proposal for a change in the libc
POSIX layer that uses a kind of caching, but I had not really
understood.
Neal, could you state your idea here to everyone?

Sören





reply via email to

[Prev in Thread] Current Thread [Next in Thread]