Re: [PATCH] arm: Disable hard IRQs in harden_branch_predictor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux