linux-kernelorg-stable/tools
Ming Lei 3f5b1169d2 selftests: ublk: make ublk_thread thread-local variable
Refactor ublk_thread to be a thread-local variable instead of storing
it in ublk_dev:

- Remove pthread_t thread field from struct ublk_thread and move it to
  struct ublk_thread_info

- Remove struct ublk_thread array from struct ublk_dev, reducing memory
  footprint

- Define struct ublk_thread as local variable in __ublk_io_handler_fn()
  instead of accessing it from dev->threads[]

- Extract main IO handling logic into __ublk_io_handler_fn() which is
  marked as noinline

- Move CPU affinity setup to ublk_io_handler_fn() before calling
  __ublk_io_handler_fn()

- Update ublk_thread_set_sched_affinity() to take struct ublk_thread_info *
  instead of struct ublk_thread *, and use pthread_setaffinity_np()
  instead of sched_setaffinity()

- Reorder struct ublk_thread fields to group related state together

This change makes each thread's ublk_thread structure truly local to
the thread, improving cache locality and reducing memory usage.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-11-03 08:34:59 -07:00
..
accounting tools/delaytop: improve error handling for missing PSI support 2025-09-13 17:32:56 -07:00
arch - Simplify inline asm flag output operands now that the minimum compiler 2025-10-11 10:51:14 -07:00
bootconfig
bpf bpftool: Remove duplicate string.h header 2025-09-27 04:23:15 -07:00
build perf build: Correct CROSS_ARCH for clang 2025-10-06 16:49:25 -03:00
certs
cgroup
counter
crypto
debugging
docs
firewire
firmware
gpio
hv
iio
include - Remove a bunch of asm implementing condition flags testing in KVM's 2025-10-11 11:19:16 -07:00
kvm/kvm_stat
laptop
leds
lib bpf-fixes 2025-10-11 10:31:38 -07:00
memory-model
mm tools/mm/slabinfo: fix access to null terminator in string boundary 2025-09-21 14:22:00 -07:00
net NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
objtool - Remove a bunch of asm implementing condition flags testing in KVM's 2025-10-11 11:19:16 -07:00
pcmcia
perf - Simplify inline asm flag output operands now that the minimum compiler 2025-10-11 10:51:14 -07:00
power Kbuild updates for 6.18 2025-10-01 20:58:51 -07:00
rcu
sched
sched_ext tools/sched_ext: scx_qmap: Make debug output quieter by default 2025-09-23 09:03:26 -10:00
scripts
sound
spi
testing selftests: ublk: make ublk_thread thread-local variable 2025-11-03 08:34:59 -07:00
thermal
time
tracing rtla: Updates for v6.18 2025-10-05 09:38:26 -07:00
usb
verification
virtio
wmi
workqueue
writeback
Makefile