diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mmzone.h | 9 | ||||
| -rw-r--r-- | include/linux/page-isolation.h | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 48bf12ef6620..ffe66e381c04 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -431,6 +431,15 @@ struct zone { | |||
| 431 | */ | 431 | */ |
| 432 | int nr_migrate_reserve_block; | 432 | int nr_migrate_reserve_block; |
| 433 | 433 | ||
| 434 | #ifdef CONFIG_MEMORY_ISOLATION | ||
| 435 | /* | ||
| 436 | * Number of isolated pageblock. It is used to solve incorrect | ||
| 437 | * freepage counting problem due to racy retrieving migratetype | ||
| 438 | * of pageblock. Protected by zone->lock. | ||
| 439 | */ | ||
| 440 | unsigned long nr_isolate_pageblock; | ||
| 441 | #endif | ||
| 442 | |||
| 434 | #ifdef CONFIG_MEMORY_HOTPLUG | 443 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 435 | /* see spanned/present_pages for more description */ | 444 | /* see spanned/present_pages for more description */ |
| 436 | seqlock_t span_seqlock; | 445 | seqlock_t span_seqlock; |
diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h index 3fff8e774067..2dc1e1697b45 100644 --- a/include/linux/page-isolation.h +++ b/include/linux/page-isolation.h | |||
| @@ -2,6 +2,10 @@ | |||
| 2 | #define __LINUX_PAGEISOLATION_H | 2 | #define __LINUX_PAGEISOLATION_H |
| 3 | 3 | ||
| 4 | #ifdef CONFIG_MEMORY_ISOLATION | 4 | #ifdef CONFIG_MEMORY_ISOLATION |
| 5 | static inline bool has_isolate_pageblock(struct zone *zone) | ||
| 6 | { | ||
| 7 | return zone->nr_isolate_pageblock; | ||
| 8 | } | ||
| 5 | static inline bool is_migrate_isolate_page(struct page *page) | 9 | static inline bool is_migrate_isolate_page(struct page *page) |
| 6 | { | 10 | { |
| 7 | return get_pageblock_migratetype(page) == MIGRATE_ISOLATE; | 11 | return get_pageblock_migratetype(page) == MIGRATE_ISOLATE; |
| @@ -11,6 +15,10 @@ static inline bool is_migrate_isolate(int migratetype) | |||
| 11 | return migratetype == MIGRATE_ISOLATE; | 15 | return migratetype == MIGRATE_ISOLATE; |
| 12 | } | 16 | } |
| 13 | #else | 17 | #else |
| 18 | static inline bool has_isolate_pageblock(struct zone *zone) | ||
| 19 | { | ||
| 20 | return false; | ||
| 21 | } | ||
| 14 | static inline bool is_migrate_isolate_page(struct page *page) | 22 | static inline bool is_migrate_isolate_page(struct page *page) |
| 15 | { | 23 | { |
| 16 | return false; | 24 | return false; |
