diff options
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.patch | 56 |
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 @@ | |||
1 | From 7560f662e5e895619c356365f675715d7f4ea577 Mon Sep 17 00:00:00 2001 | ||
2 | From: Konstantin Khlebnikov <khlebnikov@openvz.org> | ||
3 | Date: Tue, 10 Jan 2012 15:07:03 -0800 | ||
4 | Subject: [PATCH 11/73] vmscan: activate executable pages after first usage | ||
5 | |||
6 | commit c909e99364c8b6ca07864d752950b6b4ecf6bef4 upstream. | ||
7 | |||
8 | Stable 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 | |||
12 | Logic added in commit 8cab4754d24a0 ("vmscan: make mapped executable pages | ||
13 | the first class citizen") was noticeably weakened in commit | ||
14 | 645747462435d84 ("vmscan: detect mapped file pages used only once"). | ||
15 | |||
16 | Currently these pages can become "first class citizens" only after second | ||
17 | usage. After this patch page_check_references() will activate they after | ||
18 | first usage, and executable code gets yet better chance to stay in memory. | ||
19 | |||
20 | Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> | ||
21 | Cc: Pekka Enberg <penberg@kernel.org> | ||
22 | Cc: Minchan Kim <minchan.kim@gmail.com> | ||
23 | Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | ||
24 | Cc: Wu Fengguang <fengguang.wu@intel.com> | ||
25 | Cc: Johannes Weiner <hannes@cmpxchg.org> | ||
26 | Cc: Nick Piggin <npiggin@kernel.dk> | ||
27 | Cc: Mel Gorman <mel@csn.ul.ie> | ||
28 | Cc: Shaohua Li <shaohua.li@intel.com> | ||
29 | Cc: Rik van Riel <riel@redhat.com> | ||
30 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
31 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
32 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
33 | --- | ||
34 | mm/vmscan.c | 6 ++++++ | ||
35 | 1 files changed, 6 insertions(+), 0 deletions(-) | ||
36 | |||
37 | diff --git a/mm/vmscan.c b/mm/vmscan.c | ||
38 | index 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 | -- | ||
55 | 1.7.7.6 | ||
56 | |||