All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20150128062609.GA4706@blaptop>

diff --git a/a/1.txt b/N1/1.txt
index 6d4715b..bd6e862 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -49,3 +49,51 @@ about that shadow shrinker blows out lots of information to be useful
 to detect in heavy memory pressure like page thrashing)
 
 Below could be band-aid until we find a elegant solution?
+
+>From c51787f7d75340b54bab2b5e3c587f4a483da51a Mon Sep 17 00:00:00 2001
+From: Minchan Kim <minchan@kernel.org>
+Date: Wed, 28 Jan 2015 14:01:57 +0900
+Subject: [PATCH] mm: prevent page thrashing
+
+No-Signed-off-by: Minchan Kim <minchan@kernel.org>
+---
+ mm/vmscan.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/mm/vmscan.c b/mm/vmscan.c
+index 671e47edb584..b258df552e3a 100644
+--- a/mm/vmscan.c
++++ b/mm/vmscan.c
+@@ -2143,6 +2143,25 @@ out:
+ 							denominator);
+ 				break;
+ 			case SCAN_FILE:
++				if (file && global_reclaim(sc)) {
++					unsigned long zonefile;
++					unsigned long zonefree;
++
++					zonefree = zone_page_state(zone,
++								NR_FREE_PAGES);
++					zonefile = zone_page_state(zone,
++							NR_ACTIVE_FILE) +
++							zone_page_state(zone,
++							NR_INACTIVE_FILE);
++
++					/* OOM is better than code thrashing */
++					if (zonefile + zonefree <=
++						high_wmark_pages(zone)) {
++						size = 0;
++						scan = 0;
++					}
++					break;
++				}
+ 			case SCAN_ANON:
+ 				/* Scan one type exclusively */
+ 				if ((scan_balance == SCAN_FILE) != file) {
+-- 
+1.9.1
+
+
+-- 
+Kind regards,
+Minchan Kim
diff --git a/a/content_digest b/N1/content_digest
index 8c40942..4ef27c5 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -64,6 +64,54 @@
  "about that shadow shrinker blows out lots of information to be useful\n"
  "to detect in heavy memory pressure like page thrashing)\n"
  "\n"
- Below could be band-aid until we find a elegant solution?
+ "Below could be band-aid until we find a elegant solution?\n"
+ "\n"
+ ">From c51787f7d75340b54bab2b5e3c587f4a483da51a Mon Sep 17 00:00:00 2001\n"
+ "From: Minchan Kim <minchan@kernel.org>\n"
+ "Date: Wed, 28 Jan 2015 14:01:57 +0900\n"
+ "Subject: [PATCH] mm: prevent page thrashing\n"
+ "\n"
+ "No-Signed-off-by: Minchan Kim <minchan@kernel.org>\n"
+ "---\n"
+ " mm/vmscan.c | 19 +++++++++++++++++++\n"
+ " 1 file changed, 19 insertions(+)\n"
+ "\n"
+ "diff --git a/mm/vmscan.c b/mm/vmscan.c\n"
+ "index 671e47edb584..b258df552e3a 100644\n"
+ "--- a/mm/vmscan.c\n"
+ "+++ b/mm/vmscan.c\n"
+ "@@ -2143,6 +2143,25 @@ out:\n"
+ " \t\t\t\t\t\t\tdenominator);\n"
+ " \t\t\t\tbreak;\n"
+ " \t\t\tcase SCAN_FILE:\n"
+ "+\t\t\t\tif (file && global_reclaim(sc)) {\n"
+ "+\t\t\t\t\tunsigned long zonefile;\n"
+ "+\t\t\t\t\tunsigned long zonefree;\n"
+ "+\n"
+ "+\t\t\t\t\tzonefree = zone_page_state(zone,\n"
+ "+\t\t\t\t\t\t\t\tNR_FREE_PAGES);\n"
+ "+\t\t\t\t\tzonefile = zone_page_state(zone,\n"
+ "+\t\t\t\t\t\t\tNR_ACTIVE_FILE) +\n"
+ "+\t\t\t\t\t\t\tzone_page_state(zone,\n"
+ "+\t\t\t\t\t\t\tNR_INACTIVE_FILE);\n"
+ "+\n"
+ "+\t\t\t\t\t/* OOM is better than code thrashing */\n"
+ "+\t\t\t\t\tif (zonefile + zonefree <=\n"
+ "+\t\t\t\t\t\thigh_wmark_pages(zone)) {\n"
+ "+\t\t\t\t\t\tsize = 0;\n"
+ "+\t\t\t\t\t\tscan = 0;\n"
+ "+\t\t\t\t\t}\n"
+ "+\t\t\t\t\tbreak;\n"
+ "+\t\t\t\t}\n"
+ " \t\t\tcase SCAN_ANON:\n"
+ " \t\t\t\t/* Scan one type exclusively */\n"
+ " \t\t\t\tif ((scan_balance == SCAN_FILE) != file) {\n"
+ "-- \n"
+ "1.9.1\n"
+ "\n"
+ "\n"
+ "-- \n"
+ "Kind regards,\n"
+ Minchan Kim
 
-483e22c2f56c2233910ede09f30eb7b941b431fbf52b9c892f6ca597ac65f721
+1200700486d4ff697363c6cac6077cb020ab3e8efd187e9c59b29dbfe5605eda

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.