mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
vmscan: activate executable pages after first usage
Logic added in commit8cab4754d2("vmscan: make mapped executable pages the first class citizen") was noticeably weakened in commit6457474624("vmscan: detect mapped file pages used only once"). Currently these pages can become "first class citizens" only after second usage. After this patch page_check_references() will activate they after first usage, and executable code gets yet better chance to stay in memory. Signed-off-by: Konstantin Khlebnikov <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Minchan Kim <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Wu Fengguang <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Shaohua Li <[email protected]> Cc: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
34dbc67a64
commit
c909e99364
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue