All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for 2.6.24rc2-rt1] Use real time pcp locking for page draining during cpu unplug
@ 2007-12-07 11:42 Andi Kleen
  0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2007-12-07 11:42 UTC (permalink / raw)
  To: linux-rt-users; +Cc: rostedt


Use real time pcp locking for page draining during cpu unplug

Looks like a merging mistake that happened at some point. This
is the only place in the file that disables interrupts directly.

This fixes one case of CPU hotunplug failing on RT, but there 
are still more.

Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux-2.6.24-rc2-rt1-hack/mm/page_alloc.c
===================================================================
--- linux-2.6.24-rc2-rt1-hack.orig/mm/page_alloc.c
+++ linux-2.6.24-rc2-rt1-hack/mm/page_alloc.c
@@ -4049,10 +4049,11 @@ static int page_alloc_cpu_notify(struct 
 	int cpu = (unsigned long)hcpu;
 
 	if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
-		local_irq_disable();
+		unsigned long flags;
+		__lock_cpu_pcp(&flags, cpu);
 		__drain_pages(cpu);
 		vm_events_fold_cpu(cpu);
-		local_irq_enable();
+		unlock_cpu_pcp(flags, cpu);
 		refresh_cpu_vm_stats(cpu);
 	}
 	return NOTIFY_OK;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-07 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-07 11:42 [PATCH for 2.6.24rc2-rt1] Use real time pcp locking for page draining during cpu unplug Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.