On 2022-02-03 13:00:06 [+0100], Toke Høiland-Jørgensen wrote: > > Here is the code in larger context: > > > > #ifdef CONFIG_RPS > > if (static_branch_unlikely(&rps_needed)) { > > struct rps_dev_flow voidflow, *rflow = &voidflow; > > int cpu; > > > > preempt_disable(); > > rcu_read_lock(); > > > > cpu = get_rps_cpu(skb->dev, skb, &rflow); > > if (cpu < 0) > > cpu = smp_processor_id(); > > > > ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); > > > > rcu_read_unlock(); > > preempt_enable(); > > } else > > #endif > > > > This code needs the preempt_disable(). > > This is mostly so that the CPU ID stays the same throughout that section > of code, though, right? So wouldn't it work to replace the > preempt_disable() with a migrate_disable()? That should keep _RT happy, > no? It would but as mentioned previously: BH is disabled and smp_processor_id() is stable. > -Toke Sebastian