lkml.org 
[lkml]   [2000]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: 2.4.0-test5-pre1: renice priorities problem
    Date
    In article <3973B3BF.CC6DD810@norran.net>,
    Roger Larsson <roger.larsson@norran.net> wrote:
    >Hi,
    >
    >When testing other stuff with kernel 2.4.0-test5-pre1
    >
    >I found that
    >
    >> renice 2 pid
    ><pid>: old priority 0, new priority 2
    >
    >> renice 3 pid
    ><pid>: old priority -2, new priority 3
    >
    >One is wrong...

    Uhhuh. I think the old binary interface to "sys_getpriority()" was "20 -
    nice", and the new code does "20 + nice". So the sign gets set wrong.

    Try changing sys_getpriority() to say

    niceval = 20 - p->nice;

    instead of

    niceval = p->nice + 20;

    and we should be returning the same (fairly nonsensical, but they avoid
    the error code return triggering) numbers we always used to.

    Linus

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:57    [W:0.018 / U:30.640 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site