Messages in this thread | | | From | Greg Smart <> | Subject | RE: Sched.c ?? | Date | Wed, 19 May 1999 16:23:26 +1000 |
| |
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/
| |