Re: [PATCH] SMP support for drain local pages v2.

From: Nigel Cunningham
Date: Wed May 26 2004 - 18:05:57 EST


Thanks Dave for educating the ignorant :>.

Is this better?

--- 2.6.6-current-bk/mm/page_alloc.c 2004-05-26 19:47:15.000000000 +1000
+++ smp-drain-local-pages/mm/page_alloc.c 2004-05-27 08:50:36.000000000 +1000
@@ -459,6 +459,20 @@
__drain_pages(smp_processor_id());
local_irq_restore(flags);
}
+
+/*
+ * Spill per-cpu pages on all CPUs back into the buddy allocator.
+ * The first function is just to avoid a compiler warning.
+ */
+static void __smp_drain_local_pages(void * data)
+{
+ drain_local_pages();
+}
+
+void smp_drain_local_pages(void)
+{
+ on_each_cpu(__smp_drain_local_pages, NULL, 0, 1);
+}
#endif /* CONFIG_PM */

static void zone_statistics(struct zonelist *zonelist, struct zone *z)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/