diff options
| author | Ming Lei <ming.lei@redhat.com> | 2025-11-01 21:31:19 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-11-03 08:34:59 -0700 |
| commit | 0123bb91f464487cc1bbdcc515757dc723496a39 (patch) | |
| tree | ebaf40998409543cd93719dce2113008093c7379 /rust/kernel | |
| parent | c28ba6b6c51d090103800eb1c7679c32f6501dbc (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')
0 files changed, 0 insertions, 0 deletions
