aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorWill Deacon <[email protected]>2017-10-12 12:20:49 +0000
committerIngo Molnar <[email protected]>2017-10-25 08:57:24 +0000
commitb519b56e378ee82caf9b079b04f5db87dedc3251 (patch)
tree82dddca8c324c5a32ef4a41945f625868ff7a03a /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentlocking/atomic: Add atomic_cond_read_acquire() (diff)
downloadkernel-b519b56e378ee82caf9b079b04f5db87dedc3251.tar.gz
kernel-b519b56e378ee82caf9b079b04f5db87dedc3251.zip
locking/qrwlock: Use atomic_cond_read_acquire() when spinning in qrwlock
The qrwlock slowpaths involve spinning when either a prospective reader is waiting for a concurrent writer to drain, or a prospective writer is waiting for concurrent readers to drain. In both of these situations, atomic_cond_read_acquire() can be used to avoid busy-waiting and make use of any backoff functionality provided by the architecture. This patch replaces the open-code loops and rspin_until_writer_unlock() implementation with atomic_cond_read_acquire(). The write mode transition zero to _QW_WAITING is left alone, since (a) this doesn't need acquire semantics and (b) should be fast. Tested-by: Waiman Long <[email protected]> Tested-by: Jeremy Linton <[email protected]> Tested-by: Adam Wallis <[email protected]> Tested-by: Jan Glauber <[email protected]> Signed-off-by: Will Deacon <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: Boqun Feng <[email protected]> Cc: [email protected] Cc: Linus Torvalds <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions