x86/apic: Use non-atomic operations when possible
Using __clear_bit() and __cpumask_clear_cpu() is more efficient than using their atomic counterparts. Use them when atomicity is not needed, such as when manipulating bitmasks that are on the stack. Signed-off-by: Nadav Amit <namit@vmware.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lkml.kernel.org/r/20190613064813.8102-10-namit@vmware.com
This commit is contained in:

committed by
Thomas Gleixner

parent
748b170ca1
commit
dde3626f81
@@ -50,7 +50,7 @@ __x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)
|
||||
cpumask_copy(tmpmsk, mask);
|
||||
/* If IPI should not be sent to self, clear current CPU */
|
||||
if (apic_dest != APIC_DEST_ALLINC)
|
||||
cpumask_clear_cpu(smp_processor_id(), tmpmsk);
|
||||
__cpumask_clear_cpu(smp_processor_id(), tmpmsk);
|
||||
|
||||
/* Collapse cpus in a cluster so a single IPI per cluster is sent */
|
||||
for_each_cpu(cpu, tmpmsk) {
|
||||
|
Reference in New Issue
Block a user