lkml.org 
[lkml]   [1999]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: Sched.c ??
    Date
    hi,
    the decay function can be modified by changing the
    numbers. e.g. if you changed prev->avg_slice*1 to prev->avg_slice*2
    then you would have to change the denominator to 3, and
    that would slow the attack/decay rate of the function.

    You would expect these values to be defined in constants, but
    I guess no-one ever plays around with them, so they stay as
    they are.

    cheers
    Greg

    > -----Original Message-----
    > From: Mofeed Shahin [SMTP:shahin@labf.org]
    > Sent: Wednesday, May 19, 1999 12:31 AM
    > To: linux-kernel@vger.rutgers.edu
    > Subject: Sched.c ??
    >
    >
    > At line 810 of sched.c in 2.3.3 there is the following line :
    >
    > prev->avg_slice = (this_slice*1 + prev->avg_slice*1)/2;
    >
    > My question is, why multiply by 1 ?
    > ie what is the difference between the following two :
    >
    > prev->avg_slice = (this_slice*1 + prev->avg_slice*1)/2;
    > prev->avg_slice = (this_slice + prev->avg_slice)/2;
    >
    >
    > Cheers Mof.
    >
    >
    > -
    > 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/

    -
    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:51    [W:0.035 / U:0.712 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site