Re: [PATCH v3 0/3] Move thread_info into task_struct for LoongArch
From: Huacai Chen
Date: Mon Jun 15 2026 - 05:02:16 EST
Hi, Alexei,
On Mon, Jun 15, 2026 at 11:45 AM Alexei Starovoitov
<alexei.starovoitov@xxxxxxxxx> wrote:
>
> On Sun, Jun 14, 2026 at 8:31 PM Huacai Chen <chenhuacai@xxxxxxxxxx> wrote:
> >
> > On Mon, Jun 15, 2026 at 11:16 AM Tiezhu Yang <yangtiezhu@xxxxxxxxxxx> wrote:
> > >
> > > On 2026/6/15 上午10:23, Huacai Chen wrote:
> > > > On Mon, Jun 15, 2026 at 9:41 AM Tiezhu Yang <yangtiezhu@xxxxxxxxxxx> wrote:
> > > >>
> > > >> On 2026/6/14 上午10:51, Huacai Chen wrote:
> > > >>> Hi, Tiezhu,
> > > >>>
> > > >>> I have queued this series for 7.2, does the below series depend on this one?
> > > >>>
> > > >>> https://lore.kernel.org/loongarch/20260521125636.26744-1-yangtiezhu@xxxxxxxxxxx/T/#t
> > > >>
> > > >> This is independent on CONFIG_THREAD_INFO_IN_TASK.
> > > >>
> > > >>> https://lore.kernel.org/loongarch/20260428080051.20938-1-yangtiezhu@xxxxxxxxxxx/T/#t
> > > >>
> > > >> This is dependent on CONFIG_THREAD_INFO_IN_TASK.
> > > >>
> > > >> But anyway, I plan to send new version for the above two series of
> > > >> selftests once this "Move thread_info into task_struct for LoongArch"
> > > >> series is merged into the mainline, maybe after 7.2-rc1.
> > > >>
> > > >> Because the code under selftests need to be updated, for example,
> > > >> it can use bpf_get_current_task_btf()->thread_info.preempt_count
> > > >> for get_preempt_count(), and it should use ld.wu rather than ld.w
> > > >> for bpf_get_smp_processor_id().
> > > > You can update new versions now, then they can be merged together.
> > >
> > > Thanks for your suggestion.
> > >
> > > However, considering that these selftest patches need to be
> > > routed through the BPF tree (rather than the LoongArch tree),
> > > updating them right now during the active merge window might
> > > be inappropriate and risky.
> > >
> > > Given that these selftests strictly depend on the "move
> > > thread_info into task_struct" core changes, sending them to
> > > the BPF list now could cause cross-tree dependency issues and
> > > potential build breakages if the core series undergoes any late
> > > adjustments before hitting mainline.
> > >
> > > Moreover, because these are selftest adaptations rather than
> > > urgent bug fixes, they aren't high-priority for this immediate
> > > window. I will rebase and submit the new version to the BPF tree
> > > right after 7.2-rc1, once the LoongArch base infrastructure is
> > > securely merged into the mainline.
> > In history most arch-specific selftests are merged via arch trees,
> > including perf, bpf, ftrace, kvm and so on.
>
> This is not true at all.
> All bpf selftests are going through bpf-next tree.
> For example, x86 and arm64 bpf JIT changes always go
> through bpf-next.
> loongarch is causing problems this way by taking bpf JIT changes
> into the loongarch tree.
I'm sorry for my mistake. Yes, you are right, most BPF changes go
through bpf-next, but LoongArch is not the first and not the only
exception. See commit 806381e1a24c6eec2b431cbba2ba1b81e518fea8 and
3203a08c1266689c204fb8f10d6bb5186921fce2.
Frankly, cross subsystem patches usually have some extra difficulty to
get merged because of dependencies & confliction, and my mentor gave
me a solution: Merge a single tag from another subsystem (e.g. from
the bpf tree) to create a clean base, and then apply arch patches on
top of that base.
Huacai