diff options
Diffstat (limited to 'mm/compaction.c')
-rw-r--r-- | mm/compaction.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index a18201a8124e..570426edcadf 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -1047,6 +1047,12 @@ typedef enum { | |||
1047 | } isolate_migrate_t; | 1047 | } isolate_migrate_t; |
1048 | 1048 | ||
1049 | /* | 1049 | /* |
1050 | * Allow userspace to control policy on scanning the unevictable LRU for | ||
1051 | * compactable pages. | ||
1052 | */ | ||
1053 | int sysctl_compact_unevictable_allowed __read_mostly = 1; | ||
1054 | |||
1055 | /* | ||
1050 | * Isolate all pages that can be migrated from the first suitable block, | 1056 | * Isolate all pages that can be migrated from the first suitable block, |
1051 | * starting at the block pointed to by the migrate scanner pfn within | 1057 | * starting at the block pointed to by the migrate scanner pfn within |
1052 | * compact_control. | 1058 | * compact_control. |
@@ -1057,6 +1063,7 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, | |||
1057 | unsigned long low_pfn, end_pfn; | 1063 | unsigned long low_pfn, end_pfn; |
1058 | struct page *page; | 1064 | struct page *page; |
1059 | const isolate_mode_t isolate_mode = | 1065 | const isolate_mode_t isolate_mode = |
1066 | (sysctl_compact_unevictable_allowed ? ISOLATE_UNEVICTABLE : 0) | | ||
1060 | (cc->mode == MIGRATE_ASYNC ? ISOLATE_ASYNC_MIGRATE : 0); | 1067 | (cc->mode == MIGRATE_ASYNC ? ISOLATE_ASYNC_MIGRATE : 0); |
1061 | 1068 | ||
1062 | /* | 1069 | /* |