diff options
Diffstat (limited to 'mm/internal.h')
-rw-r--r-- | mm/internal.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h index 4e8e78b978b5..3db17b2a1ac6 100644 --- a/mm/internal.h +++ b/mm/internal.h | |||
@@ -39,8 +39,15 @@ static inline void __put_page(struct page *page) | |||
39 | atomic_dec(&page->_count); | 39 | atomic_dec(&page->_count); |
40 | } | 40 | } |
41 | 41 | ||
42 | /* | ||
43 | * in mm/vmscan.c: | ||
44 | */ | ||
42 | extern int isolate_lru_page(struct page *page); | 45 | extern int isolate_lru_page(struct page *page); |
46 | extern void putback_lru_page(struct page *page); | ||
43 | 47 | ||
48 | /* | ||
49 | * in mm/page_alloc.c | ||
50 | */ | ||
44 | extern void __free_pages_bootmem(struct page *page, unsigned int order); | 51 | extern void __free_pages_bootmem(struct page *page, unsigned int order); |
45 | 52 | ||
46 | /* | 53 | /* |
@@ -54,6 +61,25 @@ static inline unsigned long page_order(struct page *page) | |||
54 | return page_private(page); | 61 | return page_private(page); |
55 | } | 62 | } |
56 | 63 | ||
64 | #ifdef CONFIG_UNEVICTABLE_LRU | ||
65 | /* | ||
66 | * unevictable_migrate_page() called only from migrate_page_copy() to | ||
67 | * migrate unevictable flag to new page. | ||
68 | * Note that the old page has been isolated from the LRU lists at this | ||
69 | * point so we don't need to worry about LRU statistics. | ||
70 | */ | ||
71 | static inline void unevictable_migrate_page(struct page *new, struct page *old) | ||
72 | { | ||
73 | if (TestClearPageUnevictable(old)) | ||
74 | SetPageUnevictable(new); | ||
75 | } | ||
76 | #else | ||
77 | static inline void unevictable_migrate_page(struct page *new, struct page *old) | ||
78 | { | ||
79 | } | ||
80 | #endif | ||
81 | |||
82 | |||
57 | /* | 83 | /* |
58 | * FLATMEM and DISCONTIGMEM configurations use alloc_bootmem_node, | 84 | * FLATMEM and DISCONTIGMEM configurations use alloc_bootmem_node, |
59 | * so all functions starting at paging_init should be marked __init | 85 | * so all functions starting at paging_init should be marked __init |