summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/vmscan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 753c1e6..753a2dc 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -718,6 +718,12 @@ static enum page_references page_check_references(struct page *page,
if (referenced_page || referenced_ptes > 1)
return PAGEREF_ACTIVATE;
+ /*
+ * Activate file-backed executable pages after first usage.
+ */
+ if (vm_flags & VM_EXEC)
+ return PAGEREF_ACTIVATE;
+
return PAGEREF_KEEP;
}
OpenPOWER on IntegriCloud