Re: [PATCH v2] sched: Accelerate "pick_next_entity" under specialcondition

From: Michael Wang
Date: Thu Jan 26 2012 - 19:56:38 EST


On 01/25/2012 11:55 PM, Peter Zijlstra wrote:

> On Tue, 2012-01-17 at 11:04 +0800, Michael Wang wrote:
>>
>>> Then what if condition 1 is true now?
>>
>> We can see in original code, even condition 1 is true, we
>> still will use value3 if condition3 is true, like this:
>>
>> original:
>>
>> condition1 condition3 result
>> true true value3
>> true false value1
>>
>> That means if condition3 is true, we don't care whether
>> condition1 is true or not because we will finally use value3.
>

> Right, so from the original 8 possible states we used to evaluate 3*8 =
> 24 conditionals. The new code will reduce this to 1*4 + 2*2 + 2*3 = 14.
>
> Now I guess the question is if it matters for the modal or average
> state.
>


Hi, Peter

I think how much help this patch can do on the performance depends on
how often the condition2 and 3 occur.

> I've applied the patch since it can't be worse, but I've no idea if it
> matters or not in practice.


It's hardly to say how useful this patch is, but it will do some help
under special condition.
Thanks for your review.

Regards,
Michael Wang

>


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