|
@@ -283,6 +283,13 @@ struct zone {
|
|
/* zone watermarks, access with *_wmark_pages(zone) macros */
|
|
/* zone watermarks, access with *_wmark_pages(zone) macros */
|
|
unsigned long watermark[NR_WMARK];
|
|
unsigned long watermark[NR_WMARK];
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * When free pages are below this point, additional steps are taken
|
|
|
|
+ * when reading the number of free pages to avoid per-cpu counter
|
|
|
|
+ * drift allowing watermarks to be breached
|
|
|
|
+ */
|
|
|
|
+ unsigned long percpu_drift_mark;
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* We don't know if the memory that we're going to allocate will be freeable
|
|
* We don't know if the memory that we're going to allocate will be freeable
|
|
* or/and it will be released eventually, so to avoid totally wasting several
|
|
* or/and it will be released eventually, so to avoid totally wasting several
|
|
@@ -441,6 +448,12 @@ static inline int zone_is_oom_locked(const struct zone *zone)
|
|
return test_bit(ZONE_OOM_LOCKED, &zone->flags);
|
|
return test_bit(ZONE_OOM_LOCKED, &zone->flags);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_SMP
|
|
|
|
+unsigned long zone_nr_free_pages(struct zone *zone);
|
|
|
|
+#else
|
|
|
|
+#define zone_nr_free_pages(zone) zone_page_state(zone, NR_FREE_PAGES)
|
|
|
|
+#endif /* CONFIG_SMP */
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* The "priority" of VM scanning is how much of the queues we will scan in one
|
|
* The "priority" of VM scanning is how much of the queues we will scan in one
|
|
* go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the
|
|
* go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the
|