Uros Bizjak
f56810c94c
mm/vmalloc: use __this_cpu_try_cmpxchg() in preload_this_cpu_lock()
...
Use __this_cpu_try_cmpxchg() instead of __this_cpu_cmpxchg (*ptr, old,
new) == old in preload_this_cpu_lock(). x86 CMPXCHG instruction returns
success in ZF flag, so this change saves a compare after cmpxchg.
The generated code improves from:
4bb6: 48 85 f6 test %rsi,%rsi
4bb9: 0f 84 10 fa ff ff je 45cf <...>
4bbf: 4c 89 e8 mov %r13,%rax
4bc2: 65 48 0f b1 35 00 00 cmpxchg %rsi,%gs:0x0(%rip)
4bc9: 00 00
4bcb: 48 85 c0 test %rax,%rax
4bce: 0f 84 fb f9 ff ff je 45cf <...>
to:
4bb6: 48 85 f6 test %rsi,%rsi
4bb9: 0f 84 10 fa ff ff je 45cf <...>
4bbf: 4c 89 e8 mov %r13,%rax
4bc2: 65 48 0f b1 35 00 00 cmpxchg %rsi,%gs:0x0(%rip)
4bc9: 00 00
4bcb: 0f 84 fe f9 ff ff je 45cf <...>
No functional change intended.
Link: https://lkml.kernel.org/r/20240528144345.5980-2-ubizjak@gmail.com
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Lorenzo Stoakes <lstoakes@gmail.com>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-07-03 19:30:02 -07:00
..
2024-05-11 15:41:36 -07:00
2024-06-24 20:52:09 -07:00
2024-07-03 19:29:58 -07:00
2024-06-05 19:19:25 -07:00
2024-05-05 17:53:51 -07:00
2024-07-03 19:30:00 -07:00
2023-10-25 16:47:13 -07:00
2024-02-22 10:24:57 -08:00
2024-04-25 20:56:42 -07:00
2024-02-22 10:24:57 -08:00
2024-06-24 20:52:09 -07:00
2024-04-25 20:56:04 -07:00
2024-06-15 10:43:08 -07:00
2024-05-05 17:53:31 -07:00
2024-07-03 19:29:58 -07:00
2023-12-05 11:17:58 +01:00
2024-05-14 00:31:43 -07:00
2023-06-23 16:59:31 -07:00
2024-06-05 19:19:26 -07:00
2024-07-03 19:29:59 -07:00
2023-06-23 16:58:19 -07:00
2024-05-07 10:37:01 -07:00
2023-12-29 12:22:28 -08:00
2024-04-25 20:55:46 -07:00
2024-07-03 19:29:56 -07:00
2024-05-05 17:53:41 -07:00
2024-04-25 20:56:32 -07:00
2023-10-25 16:47:14 -07:00
2024-07-03 19:29:52 -07:00
2024-07-03 19:29:58 -07:00
2023-12-12 10:11:32 +01:00
2024-07-03 19:30:01 -07:00
2023-08-18 10:12:36 -07:00
2024-05-19 09:21:03 -07:00
2024-01-22 10:31:08 +01:00
2024-05-05 17:53:53 -07:00
2024-05-19 14:40:44 -07:00
2024-06-05 19:19:26 -07:00
2024-02-22 10:24:54 -08:00
2024-07-03 19:29:57 -07:00
2024-05-23 19:40:26 -07:00
2023-08-24 16:20:30 -07:00
2024-06-16 10:17:57 +03:00
2024-07-03 19:29:59 -07:00
2024-03-04 17:01:21 -08:00
2024-07-03 19:30:02 -07:00
2024-07-03 19:29:59 -07:00
2024-05-05 17:53:26 -07:00
2024-07-03 19:30:01 -07:00
2024-07-03 19:29:53 -07:00
2024-06-05 19:19:26 -07:00
2024-05-05 17:53:49 -07:00
2024-03-13 12:12:21 -07:00
2024-07-03 19:30:00 -07:00
2024-07-03 19:30:00 -07:00
2024-07-03 19:29:56 -07:00
2024-04-25 20:56:19 -07:00
2024-07-03 19:29:58 -07:00
2024-07-03 19:29:58 -07:00
2024-02-22 15:27:17 -08:00
2024-04-11 13:18:36 -04:00
2023-12-12 10:57:02 -08:00
2024-07-03 19:29:56 -07:00
2024-05-23 19:40:26 -07:00
2024-05-23 19:40:26 -07:00
2024-05-19 09:21:03 -07:00
2024-04-25 20:56:32 -07:00
2024-06-24 20:52:11 -07:00
2024-04-25 20:56:14 -07:00
2024-07-03 19:29:55 -07:00
2024-04-25 20:56:04 -07:00
2024-05-19 14:40:44 -07:00
2023-12-10 16:51:50 -08:00
2024-01-08 15:27:15 -08:00
2024-06-15 10:43:04 -07:00
2024-05-05 17:53:45 -07:00
2024-07-03 19:29:54 -07:00
2023-12-10 16:51:53 -08:00
2024-04-25 20:55:56 -07:00
2024-04-25 20:55:49 -07:00
2024-04-25 20:55:56 -07:00
2024-05-07 10:37:00 -07:00
2023-12-10 16:51:39 -08:00
2024-02-22 10:24:47 -08:00
2024-05-19 09:21:03 -07:00
2024-07-03 19:30:01 -07:00
2023-08-21 13:38:02 -07:00
2024-03-26 11:07:23 -07:00
2024-07-03 19:29:56 -07:00
2024-04-25 20:55:57 -07:00
2023-10-04 10:32:26 -07:00
2024-01-05 09:58:32 -08:00
2024-01-08 15:27:15 -08:00
2024-05-19 09:21:03 -07:00
2024-05-19 09:21:03 -07:00
2024-06-24 20:52:09 -07:00
2023-08-18 10:12:53 -07:00
2024-05-05 17:53:40 -07:00
2024-04-25 20:56:37 -07:00
2024-07-03 19:29:56 -07:00
2024-05-05 17:53:50 -07:00
2024-07-03 19:29:56 -07:00
2024-07-03 19:30:01 -07:00
2024-07-03 19:29:52 -07:00
2024-05-19 09:21:03 -07:00
2024-06-17 12:00:22 -07:00
2024-07-03 19:30:02 -07:00
2023-11-28 14:08:38 +01:00
2024-07-03 19:29:53 -07:00
2024-04-15 14:31:47 +02:00
2024-05-07 10:36:59 -07:00
2024-04-25 20:55:48 -07:00
2024-04-25 20:55:48 -07:00
2024-04-25 20:55:48 -07:00
2024-07-03 19:30:00 -07:00
2024-07-03 19:30:00 -07:00