lkml.org 
[lkml]   [2008]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [git pull] scheduler updates for v2.6.27, phase #2
    From
    Date
    On Mon, 2008-07-21 at 13:16 -0700, Daniel Walker wrote:
    > On Mon, 2008-07-21 at 21:23 +0200, Peter Zijlstra wrote:
    >
    > > Does this work for you?
    > >
    >
    > Yours removed the warning .. I made an alternate one below only compile
    > tested, your choice..

    How about this one - it seems there is a whole scala of new division
    instructions these days... :-)

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>


    diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
    index 47ceac9..3c38686 100644
    --- a/kernel/sched_rt.c
    +++ b/kernel/sched_rt.c
    @@ -253,7 +253,7 @@ static int do_balance_runtime(struct rt_rq *rt_rq)

    diff = iter->rt_runtime - iter->rt_time;
    if (diff > 0) {
    - do_div(diff, weight);
    + diff = div_u64((u64)diff, weight);
    if (rt_rq->rt_runtime + diff > rt_period)
    diff = rt_period - rt_rq->rt_runtime;
    iter->rt_runtime -= diff;



    \
     
     \ /
      Last update: 2008-07-24 12:45    [W:0.021 / U:0.072 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site