[PATCH v1 0/3] Move thread_info into task_struct for LoongArch

From: Tiezhu Yang

Date: Mon Jun 08 2026 - 07:06:13 EST


This is a formal patch series, based on 7.1-rc7, addressed all
the review comments, tested with stress-ng, successfully passed
the 3-hours stress testing suite.

stress-ng --context $(nproc) --timeout 30m --metrics-brief
stress-ng --sysbadaddr $(nproc) --timeout 30m
stress-ng --fault $(nproc) --timeout 30m
stress-ng --pthread $(nproc) --timeout 30m
stress-ng --schedmix $(nproc) --yield $(nproc) --timeout 60m --metrics

Additionally, UnixBench benchmarking shows a steady performance
lift across all core counts.

Tiezhu Yang (3):
LoongArch: Implement CONFIG_THREAD_INFO_IN_TASK
LoongArch: BPF: Inline bpf_get_current_task{_btf}() helpers
LoongArch: BPF: Inline bpf_get_smp_processor_id() helper

.../core/thread-info-in-task/arch-support.txt | 2 +-
arch/loongarch/Kconfig | 1 +
arch/loongarch/include/asm/current.h | 30 +++++++++++++++++++
arch/loongarch/include/asm/smp.h | 3 +-
arch/loongarch/include/asm/stackframe.h | 9 ++++--
arch/loongarch/include/asm/switch_to.h | 6 ++--
arch/loongarch/include/asm/thread_info.h | 10 -------
arch/loongarch/kernel/asm-offsets.c | 6 ++--
arch/loongarch/kernel/entry.S | 7 +++--
arch/loongarch/kernel/head.S | 18 ++++++-----
arch/loongarch/kernel/process.c | 3 ++
arch/loongarch/kernel/relocate.c | 2 +-
arch/loongarch/kernel/setup.c | 1 +
arch/loongarch/kernel/smp.c | 6 ++--
arch/loongarch/kernel/switch.S | 13 ++++----
arch/loongarch/net/bpf_jit.c | 26 ++++++++++++++++
16 files changed, 105 insertions(+), 38 deletions(-)
create mode 100644 arch/loongarch/include/asm/current.h

--
2.42.0