diff options
-rw-r--r-- | mm/vmscan.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 811141e166e..fed30222e4a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -726,6 +726,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; } |