On 6 December 2012 17:31, Liviu Dudau <liviu.du...@arm.com> wrote:
> [discussion not relevant to this reply removed]
>>
>> Liviu,
>>
>> I'm just saying that the use case above can't happen because the
>> fields are not updated by thread but by scheduler and it can't be
>> pre-empted by a thread while updating them. We can have the situation
>> where cpu A updates its fields and cpu B reads them simultaneously.
>> This is the use case that i'm trying to address with this patch.
>
> And me and Morten are saying that the compiler and/or system can reorder the 
> reads
> on CPU B and you have

That's a new use case ;-)
and the result of the compilation had shown that it was not reordered.
But I agree that the sequence need to be more deeply studied to ensure
that all use case are solved and that's why I had not pushed any
improvement/modification yet.

>
>     CPU A (running scheduler)            CPU B (running is_buddy_busy)
>     update rq->avg.runnable_avg_sum      period = rq->avg.runnable_avg_period
>                                          new_period = 
> rq->avg.runnable_avg_period
>     update rq->avg.runnable_avg_period   sum = rq->avg.runnable_avg_sum
>                                          new_sum = rq->avg.runnable_avg_sum
>
> while () condition is met and you break out of the loop, using stale value for
> one of the variables that you then use to decide if the buddy is busy.
>
> Regards,
> Liviu
>
>
>>
>> Regards,
>> Vincent
>>
>
> [rest of the thread discussion removed for clarity]
>
> --
> ====================
> | I would like to |
> | fix the world,  |
> | but they're not |
> | giving me the   |
>  \ source code!  /
>   ---------------
>     ¯\_(ツ)_/¯
>

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to