summaryrefslogtreecommitdiff
path: root/rust/kernel/mm.rs
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2025-11-01 21:31:19 +0800
committerJens Axboe <axboe@kernel.dk>2025-11-03 08:34:59 -0700
commit0123bb91f464487cc1bbdcc515757dc723496a39 (patch)
treeebaf40998409543cd93719dce2113008093c7379 /rust/kernel/mm.rs
parentc28ba6b6c51d090103800eb1c7679c32f6501dbc (diff)
selftests: ublk: set CPU affinity before thread initialization
Move ublk_thread_set_sched_affinity() call before ublk_thread_init() to ensure memory allocations during thread initialization occur on the correct NUMA node. This leverages Linux's first-touch memory policy for better NUMA locality. Also convert ublk_thread_set_sched_affinity() to use pthread_setaffinity_np() instead of sched_setaffinity(), as the pthread API is the proper interface for setting thread affinity in multithreaded programs. Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel/mm.rs')
0 files changed, 0 insertions, 0 deletions