Peter Zijlstra
1b9e01fcc4
locking/osq: Switch osq_wait_next()/atomic_cmpxchg() ordering
...
The atomic_cmpxchg() in osq_wait_next() removes the current CPU's node
from the tail of the queue and puts @old_cpu back.
This is very much like an 'unlock', which is RELEASE, rather than
ACQUIRE.
Additionally, on success (the only case where the ordering is
effective), this returns NULL which means both callsites will do nothing
more, there are no subsequent operations to order against.
Furthermore, the osq_lock() caller will then return false, indicating
failure to acquire -- the mutex must go block. Again, not making a case
for ACQUIRE. Neither atomics nor locks provide ordering on failure.
Since ACQUIRE makes no sense, while RELEASE makes it more symmetric with
osq_unlock(), switch the ordering. This then makes osq_unlock()
consistently RELEASE.
Fixes: c55a6ffa62 ("locking/osq: Relax atomic semantics")
Suggested-by: David Laight <[email protected] >
Signed-off-by: Peter Zijlstra (Intel) <[email protected] >
Signed-off-by: Ingo Molnar <[email protected] >
Cc: Linus Torvalds <[email protected] >
Cc: Waiman Long <[email protected] >
Cc: [email protected]
2026-11-06 11:16:14 +01:00
..
2026-11-02 22:42:10 +00:00
2026-10-29 07:35:19 -10:00
2026-10-24 01:55:54 -07:00
2026-10-28 16:55:40 +00:00
2026-10-23 14:31:51 -10:00
2026-10-21 07:19:30 -10:00
2026-10-27 12:23:17 -10:00
2026-10-21 11:20:38 -10:00
2026-10-06 19:02:59 -07:00
2026-10-25 17:51:25 -10:00
2026-10-10 13:03:13 +00:00
2026-09-04 10:28:52 +02:00
2026-10-15 11:37:32 +03:00
2026-11-06 11:16:14 +01:00
2026-10-23 13:08:49 -10:00
2026-10-30 13:22:02 -10:00
2026-10-22 10:22:29 +02:00
2026-10-12 16:53:20 -07:00
2026-11-01 09:52:32 -08:00
2026-09-11 15:00:37 +02:00
2026-11-01 09:19:12 -08:00
2026-10-30 09:48:45 -10:00
2026-02-21 20:03:00 -08:00
2026-05-11 23:13:01 +02:00
2026-02-21 17:09:51 -08:00
2026-05-27 19:15:34 -04:00
2026-10-16 09:36:00 -04:00
2026-09-01 17:35:19 -04:00
2026-08-31 13:52:41 -04:00
2026-09-28 18:10:56 -04:00
2026-09-01 17:35:19 -04:00
2026-10-20 20:04:07 -10:00
2025-12-03 16:53:19 +01:00
2026-10-19 17:57:49 -10:00
2026-10-19 19:23:18 -10:00
2026-01-01 16:39:46 +08:00
2026-09-11 15:53:53 +02:00
2026-09-28 08:44:41 +02:00
2026-09-02 14:25:16 -07:00
2026-07-13 10:04:47 +03:00
2026-03-27 21:19:46 -07:00
2026-09-09 17:48:37 -04:00
2026-08-05 15:28:23 +02:00
2026-05-26 11:02:01 +02:00
2026-10-21 11:20:38 -10:00
2026-02-21 17:09:51 -08:00
2026-11-02 11:21:28 +01:00
2026-02-21 01:02:28 -08:00
2026-10-06 19:02:56 -07:00
2026-10-01 14:00:35 +02:00
2026-09-04 21:37:00 -07:00
2026-01-22 15:58:22 -07:00
2026-02-21 17:09:51 -08:00
2026-02-12 12:13:01 -08:00
2026-06-29 10:43:45 +02:00
2026-09-02 14:25:16 -07:00
2026-08-07 17:58:10 +02:00
2026-09-28 08:44:41 +02:00
2026-10-13 21:25:48 -07:00
2026-10-29 12:39:45 -10:00
2026-09-02 07:41:28 +03:00
2026-10-25 17:42:42 -10:00
2026-02-21 17:09:51 -08:00
2026-10-23 12:12:26 -10:00
2025-11-27 15:44:53 +01:00
2026-04-03 19:39:52 +02:00
2026-10-29 07:49:07 -10:00
2026-10-21 10:45:44 -10:00
2026-03-24 21:42:37 +00:00
2026-08-21 12:42:27 +02:00
2026-08-31 16:14:10 -04:00
2026-10-22 18:50:20 +02:00
2026-10-29 15:46:57 +01:00
2026-09-16 22:49:49 +10:00
2026-11-02 19:18:57 -08:00
2026-08-23 08:07:11 -07:00
2026-10-19 16:22:15 -10:00
2026-10-12 11:13:01 +02:00
2026-10-24 00:46:50 -07:00
2026-10-21 07:19:30 -10:00
2026-10-27 12:08:22 -10:00
2026-02-21 17:09:51 -08:00
2026-10-13 21:25:48 -07:00
2026-10-27 12:23:17 -10:00
2026-05-06 17:40:27 +02:00
2026-08-23 19:28:04 -07:00
2025-11-12 10:00:13 -08:00
2026-10-06 01:58:47 -07:00
2026-10-22 18:50:20 +02:00
2026-10-21 11:03:28 -10:00
2026-10-01 14:00:36 +02:00
2026-10-15 10:38:13 +02:00
2026-02-21 17:09:51 -08:00
2026-07-31 12:35:26 +02:00
2026-07-07 23:52:53 +02:00
2026-10-24 00:46:49 -07:00
2026-10-23 09:37:09 -10:00
2026-10-13 21:25:44 -07:00
2026-08-14 14:59:21 -07:00
2026-04-14 05:17:02 -04:00
2026-01-26 19:07:13 -08:00
2026-10-30 16:02:40 +01:00
2026-09-22 15:04:52 +02:00
2026-07-16 09:24:55 +02:00
2026-10-29 14:35:13 +01:00
2026-08-03 10:08:36 +02:00
2026-08-05 15:28:23 +02:00
2026-09-04 12:46:45 +02:00
2026-06-10 02:17:00 -04:00
2026-10-24 01:56:10 -07:00
2026-10-30 15:53:44 +01:00
2026-03-27 21:19:47 -07:00
2026-10-13 21:25:48 -07:00
2026-10-24 00:46:50 -07:00
2026-03-05 07:27:48 -10:00
2026-10-22 10:25:52 -10:00