]> www.infradead.org Git - nvme.git/commit
selftests: ublk: set queue pthread's cpu affinity
authorMing Lei <ming.lei@redhat.com>
Sat, 12 Apr 2025 02:30:24 +0000 (10:30 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Apr 2025 01:32:18 +0000 (19:32 -0600)
commit2f0a692a93a585ead9ccffd0642694946d74411f
treeed463b75c563c16d0e4e47a975ffa449692acce3
parent62867a046a223e6eb771e23d2048e839c1d949d7
selftests: ublk: set queue pthread's cpu affinity

In NUMA machine, ublk IO performance is very sensitive with queue
pthread's affinity setting.

Retrieve queue's affinity and select the 1st cpu as queue thread's sched
affinity, and it is observed that single cpu task affinity can get
stable & good performance if client application is put on proper cpu.

Dump this info when adding one ublk device. Use shmem to communicate
queue's tid between parent and daemon.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250412023035.2649275-9-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/kublk.c
tools/testing/selftests/ublk/kublk.h