On Fri, Aug 27, 2010 at 12:31 PM, Ying Han <yinghan@google.com> wrote:
True. I also wanted it but we have to care swap configured but
non-enabling still yet system as well as non-swap configured system at
that time.
If your system is no swap configured, how about this?
(It's a not formal proper patch but just quick patch to show the concept).
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 3109ff7..641c6a6 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1580,6 +1580,11 @@ static void shrink_active_list(unsigned long
nr_pages, struct zone *zone,
spin_unlock_irq(&zone->lru_lock);
}
+/*
+ * If system doesn't have a swap configuration,
+ * it doesn't need to age anon pages in kswapd.
+ */
+#ifdef CONFIG_SWAP
static int inactive_anon_is_low_global(struct zone *zone)
{
unsigned long active, inactive;
@@ -1611,6 +1616,12 @@ static int inactive_anon_is_low(struct zone
*zone, struct scan_control *sc)
low = mem_cgroup_inactive_anon_is_low(sc->mem_cgroup);
return low;
}
+#else
+static inline int inactive_anon_is_low(struct zone *zone, struct
scan_control *sc)
+{
+ return 0;
+}
+#endif
static int inactive_file_is_low_global(struct zone *zone)
{
--
Kind regards,
Minchan Kim
--