Re: [PATCH v4 2/3] sched: make migrate_enable/migrate_disable inline

From: Alexei Starovoitov
Date: Tue Sep 16 2025 - 21:29:39 EST


On Tue, Sep 16, 2025 at 6:26 PM Menglong Dong <menglong.dong@xxxxxxxxx> wrote:
>
> On 2025/9/16 19:07 Peter Zijlstra <peterz@xxxxxxxxxxxxx> write:
> > On Thu, Aug 28, 2025 at 02:03:53PM +0800, Menglong Dong wrote:
> >
> > > +/* The "struct rq" is not available here, so we can't access the
> > > + * "runqueues" with this_cpu_ptr(), as the compilation will fail in
> > > + * this_cpu_ptr() -> raw_cpu_ptr() -> __verify_pcpu_ptr():
> > > + * typeof((ptr) + 0)
> > > + *
> > > + * So use arch_raw_cpu_ptr()/PERCPU_PTR() directly here.
> > > + */
> >
> > Please fix broken comment style while you fix that compile error.
>
> It's a little embarrassing. The compile error is caused by the commit
> 1b93c03fb319 ("rcu: add rcu_read_lock_dont_migrate()") in bpf-next tree,
> which uses migrate_enable/migrate_disable in include/linux/rcupdate.h
> but include the <linux/preempt.h>.
>
> I can fix it by replace the linux/preempt.h with linux/sched.h, but should
> I fix it in this series? I mean, the commit 1b93c03fb319 doesn't exist in
> the tip for now :/

If it's just a different include then go for it.
Make sure there are no nasty build issues during the merge window.