summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0011-vmscan-activate-executable-pages-after-first-usage.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0011-vmscan-activate-executable-pages-after-first-usage.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0011-vmscan-activate-executable-pages-after-first-usage.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0011-vmscan-activate-executable-pages-after-first-usage.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0011-vmscan-activate-executable-pages-after-first-usage.patch
new file mode 100644
index 00000000..0f242088
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0011-vmscan-activate-executable-pages-after-first-usage.patch
@@ -0,0 +1,56 @@
1From 7560f662e5e895619c356365f675715d7f4ea577 Mon Sep 17 00:00:00 2001
2From: Konstantin Khlebnikov <khlebnikov@openvz.org>
3Date: Tue, 10 Jan 2012 15:07:03 -0800
4Subject: [PATCH 11/73] vmscan: activate executable pages after first usage
5
6commit c909e99364c8b6ca07864d752950b6b4ecf6bef4 upstream.
7
8Stable note: Not tracked in Bugzilla. There were reports of shared
9 mapped pages being unfairly reclaimed in comparison to older kernels.
10 This is being addressed over time.
11
12Logic added in commit 8cab4754d24a0 ("vmscan: make mapped executable pages
13the first class citizen") was noticeably weakened in commit
14645747462435d84 ("vmscan: detect mapped file pages used only once").
15
16Currently these pages can become "first class citizens" only after second
17usage. After this patch page_check_references() will activate they after
18first usage, and executable code gets yet better chance to stay in memory.
19
20Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
21Cc: Pekka Enberg <penberg@kernel.org>
22Cc: Minchan Kim <minchan.kim@gmail.com>
23Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
24Cc: Wu Fengguang <fengguang.wu@intel.com>
25Cc: Johannes Weiner <hannes@cmpxchg.org>
26Cc: Nick Piggin <npiggin@kernel.dk>
27Cc: Mel Gorman <mel@csn.ul.ie>
28Cc: Shaohua Li <shaohua.li@intel.com>
29Cc: Rik van Riel <riel@redhat.com>
30Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
31Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
32Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
33---
34 mm/vmscan.c | 6 ++++++
35 1 files changed, 6 insertions(+), 0 deletions(-)
36
37diff --git a/mm/vmscan.c b/mm/vmscan.c
38index cd27455..87de9c6 100644
39--- a/mm/vmscan.c
40+++ b/mm/vmscan.c
41@@ -718,6 +718,12 @@ static enum page_references page_check_references(struct page *page,
42 if (referenced_page || referenced_ptes > 1)
43 return PAGEREF_ACTIVATE;
44
45+ /*
46+ * Activate file-backed executable pages after first usage.
47+ */
48+ if (vm_flags & VM_EXEC)
49+ return PAGEREF_ACTIVATE;
50+
51 return PAGEREF_KEEP;
52 }
53
54--
551.7.7.6
56