On 2/8/19 8:11 PM, Steven Rostedt wrote: >> - harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn, >> - smp_processor_id()); >> + harden_branch_predictor_fn_t fn; >> + unsigned long flags; >> + >> + local_irq_save(flags); > > local_irq_save() is a bit heavy wait. A preempt_disable() would be > faster, and in case the fn() can call a spinlock, perhaps just a > migrate_disable(). But I'm not sure how we decided about open coded > migrate_disable()s yet. > Thanks, preempt_disable sounds reasonable to me. I will do some testing with preempt_disable/enable, and come back with an updated patch. Bernd.