Subject: Re: linux-next: manual merge of the rcu tree with the ftrace tree

From: Yonghong Song <[email-masked]>
Date: Sun, 30 Nov 2025 10:49:36 -0800

On 11/17/25 11:35 PM, Sebastian Andrzej Siewior wrote:
> On 2025-11-14 10:31:45 [-0800], Yonghong Song wrote:
>>> I believe that migration needs to be disabled at this point, but I am
>>> again adding Yonghong on CC for his perspective.
>> Yes, migration needs to be disabled for rt kernel in order to let
>> bpf program running properly.
> Why is disabling migration special in regard to RT kernels vs !RT?
> Why do we need to disable migration given that bpf_prog_run_array()
> already does that? Is there a different entry point?

bpf_prog_run_array() has two callers. One is trace_call_bpf() in
kernel/trace/bpf_trace.c, and the other is lirc_bpf_run() in
drivers/media/rc/bpf-lirc.c. The migration disable/enabled is
needed for lirc_bpf_run().

> My point why is it required to disable migration on trace-point entry
> for BPF given that the BPF-entry already does so.

In trace_call_bpf(), we have
    if (unlikely(__this_cpu_inc_return(bpf_prog_active) != 1)) { ... }
So migriate_disable() is necessary.

> Sebastian