diff options
author | Davidlohr Bueso <[email protected]> | 2018-12-02 21:31:30 -0800 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2019-01-21 11:18:50 +0100 |
commit | 87ff19cb2f1aa55a5d8b691e6690cc059a59d2ec (patch) | |
tree | a68291414ab3e040c7701ed26c361fe7c9f2d13d /drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | |
parent | 629a3cd045e3e0717606e069f4907b5b3e7e0be0 (diff) |
sched/wake_q: Add branch prediction hint to wake_q_add() cmpxchg
The cmpxchg() will fail when the task is already in the process
of waking up, and as such is an extremely rare occurrence.
Micro-optimize the call and put an unlikely() around it.
To no surprise, when using CONFIG_PROFILE_ANNOTATED_BRANCHES
under a number of workloads the incorrect rate was a mere 1-2%.
Signed-off-by: Davidlohr Bueso <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Waiman Long <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Yongji Xie <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://lkml.kernel.org/r/20181203053130.gwkw6kg72azt2npb@linux-r8p5
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c')
0 files changed, 0 insertions, 0 deletions