This repository has been archived by the owner on Mar 17, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM: sched/loadavg: Use {READ,WRITE}_ONCE() for sample window
Commit caeb5882979bc6f3c8766fcf59c6269b38f521bc upstream. 'calc_load_update' is accessed without any kind of locking and there's a clear assumption in the code that only a single value is read or written. Make this explicit by using READ_ONCE() and WRITE_ONCE(), and avoid unintentionally seeing multiple values, or having the load/stores split. Technically the loads in calc_global_*() don't require this since those are the only functions that update 'calc_load_update', but I've added the READ_ONCE() for consistency. Suggested-by: Peter Zijlstra <[email protected]> Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Morten Rasmussen <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vincent Guittot <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Harsh Shandilya <[email protected]>
- Loading branch information
3004fd6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Harsh
This commit not affect.
loadavg.c file mismerge by CAF
See:
ahmedradaideh/OnePlus3T@9944329
ahmedradaideh/OnePlus3T@5c160d8
of course there is more :)
3004fd6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sigh, thanks Qualcomm. I've queued for the revert the next build. Thanks!
Edit: I've also picked up the two commits you linked.
3004fd6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good luck, More Fixes to problems code.
https://github.com/ahmedradaideh/OnePlus3T/commits/8.x-base?before=5c160d822f622e6eb6d6b8586a35a00d706b8189+400