Some of these patches do make the code significantly more complex to
read and follow. Boy, I hope it's all useful!
On Thu, 30 Sep 2010 12:50:21 +0900
Namhyung Kim <namhyung@gmail.com> wrote:
This isn't a good idea: there's a good chance that someone will later
add a #include <linux/compaction.h> at the top of the file to support
future changes. So we end up including it twice.
So I assume the below will work OK??
--- a/mm/vmstat.c~vmstat-include-compactionh-when-config_compaction-fix
+++ a/mm/vmstat.c
@@ -18,6 +18,7 @@
#include <linux/sched.h>
#include <linux/math64.h>
#include <linux/writeback.h>
+#include <linux/compaction.h>
#ifdef CONFIG_VM_EVENT_COUNTERS
DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}};
@@ -395,7 +396,6 @@ void zone_statistics(struct zone *prefer
#endif
#ifdef CONFIG_COMPACTION
-#include <linux/compaction.h>
struct contig_page_info {
unsigned long free_pages;
_
--