lkml.org 
[lkml]   [2005]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH] MAX_USER_RT_PRIO and MAX_RT_PRIO are wrong!
    From
    Date
    On Tue, 2005-06-07 at 10:48 -0500, Dean Nelson wrote:
    > You are correct xpc_activating() needs to be changed to use MAX_RT_PRIO.
    > So please do add that change to your patch.

    I haven't tested this patch, I just used the previous patch (which I did
    test) and added your change.

    -- Steve

    --- linux-2.6.12-rc6/kernel/sched.c.orig 2005-06-07 13:22:33.000000000 -0400
    +++ linux-2.6.12-rc6/kernel/sched.c 2005-06-07 13:22:37.000000000 -0400
    @@ -3347,7 +3347,7 @@
    p->policy = policy;
    p->rt_priority = prio;
    if (policy != SCHED_NORMAL)
    - p->prio = MAX_USER_RT_PRIO-1 - p->rt_priority;
    + p->prio = MAX_RT_PRIO-1 - p->rt_priority;
    else
    p->prio = p->static_prio;
    }
    @@ -3379,7 +3379,8 @@
    * 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_NORMAL is 0.
    */
    if (param->sched_priority < 0 ||
    - param->sched_priority > MAX_USER_RT_PRIO-1)
    + (p->mm && param->sched_priority > MAX_USER_RT_PRIO-1) ||
    + (!p->mm && param->sched_priority > MAX_RT_PRIO-1))
    return -EINVAL;
    if ((policy == SCHED_NORMAL) != (param->sched_priority == 0))
    return -EINVAL;
    --- linux-2.6.12-rc6/arch/ia64/sn/kernel/xpc_main.c.orig 2005-06-07 13:23:26.000000000 -0400
    +++ linux-2.6.12-rc6/arch/ia64/sn/kernel/xpc_main.c 2005-06-07 13:23:43.000000000 -0400
    @@ -420,7 +420,7 @@
    partid_t partid = (u64) __partid;
    struct xpc_partition *part = &xpc_partitions[partid];
    unsigned long irq_flags;
    - struct sched_param param = { sched_priority: MAX_USER_RT_PRIO - 1 };
    + struct sched_param param = { sched_priority: MAX_RT_PRIO - 1 };
    int ret;




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

    \
     
     \ /
      Last update: 2005-06-07 19:36    [W:0.022 / U:94.732 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site