Re: [PATCH RESEND -rt] mm: perform lru_add_drain_all() remotely
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2016-05-12 09:21:53
* Sebastian Andrzej Siewior | 2016-05-12 10:42:30 [+0200]:
quoted
diff --git a/mm/swap.c b/mm/swap.c index ca194ae..84c3c21 100644 --- a/mm/swap.c +++ b/mm/swap.c@@ -821,9 +821,9 @@ void lru_add_drain_cpu(int cpu)unsigned long flags; /* No harm done if a racing interrupt already did this */ - local_lock_irqsave(rotate_lock, flags); + local_lock_irqsave_other_cpu(rotate_lock, flags, cpu); pagevec_move_tail(pvec); - local_unlock_irqrestore(rotate_lock, flags); + local_unlock_irqrestore_other_cpu(rotate_lock, flags, cpu);This piece might be required independently of this patch. It would be nice to have it in page_alloc_cpu_notify() :) I take care of this…
no, I won't :) It looks halfway like an upstream bug. Vanila has here local_irq_save() which always matches the local CPU except when it is invoked from page_alloc_cpu_notify() CPU_DEAD notifier. Here it does not matter because the CPU is gone and won't take the locks anymore. Unless, we start taking them cross-CPU which is only possible with this patch. Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html