|
@@ -1046,6 +1046,12 @@ typedef enum {
|
|
|
ISOLATE_SUCCESS, /* Pages isolated, migrate */
|
|
ISOLATE_SUCCESS, /* Pages isolated, migrate */
|
|
|
} isolate_migrate_t;
|
|
} isolate_migrate_t;
|
|
|
|
|
|
|
|
|
|
+/*
|
|
|
|
|
+ * Allow userspace to control policy on scanning the unevictable LRU for
|
|
|
|
|
+ * compactable pages.
|
|
|
|
|
+ */
|
|
|
|
|
+int sysctl_compact_unevictable_allowed __read_mostly = 1;
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
* Isolate all pages that can be migrated from the first suitable block,
|
|
* Isolate all pages that can be migrated from the first suitable block,
|
|
|
* starting at the block pointed to by the migrate scanner pfn within
|
|
* starting at the block pointed to by the migrate scanner pfn within
|
|
@@ -1057,6 +1063,7 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
|
|
|
unsigned long low_pfn, end_pfn;
|
|
unsigned long low_pfn, end_pfn;
|
|
|
struct page *page;
|
|
struct page *page;
|
|
|
const isolate_mode_t isolate_mode =
|
|
const isolate_mode_t isolate_mode =
|
|
|
|
|
+ (sysctl_compact_unevictable_allowed ? ISOLATE_UNEVICTABLE : 0) |
|
|
|
(cc->mode == MIGRATE_ASYNC ? ISOLATE_ASYNC_MIGRATE : 0);
|
|
(cc->mode == MIGRATE_ASYNC ? ISOLATE_ASYNC_MIGRATE : 0);
|
|
|
|
|
|
|
|
/*
|
|
/*
|