diff options
| author | David S. Miller <davem@davemloft.net> | 2011-01-24 16:17:06 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-01-24 16:17:06 -0500 |
| commit | e92427b289d252cfbd4cb5282d92f4ce1a5bb1fb (patch) | |
| tree | 6d30e5e7b7f8e9aaa51d43b7128ac56860fa03bb /include/linux/mm_inline.h | |
| parent | c506653d35249bb4738bb139c24362e1ae724bc1 (diff) | |
| parent | ec30f343d61391ab23705e50a525da1d55395780 (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/mm_inline.h')
| -rw-r--r-- | include/linux/mm_inline.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 8835b877b8d..8f7d24712dc 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef LINUX_MM_INLINE_H | 1 | #ifndef LINUX_MM_INLINE_H |
| 2 | #define LINUX_MM_INLINE_H | 2 | #define LINUX_MM_INLINE_H |
| 3 | 3 | ||
| 4 | #include <linux/huge_mm.h> | ||
| 5 | |||
| 4 | /** | 6 | /** |
| 5 | * page_is_file_cache - should the page be on a file LRU or anon LRU? | 7 | * page_is_file_cache - should the page be on a file LRU or anon LRU? |
| 6 | * @page: the page to test | 8 | * @page: the page to test |
| @@ -20,18 +22,25 @@ static inline int page_is_file_cache(struct page *page) | |||
| 20 | } | 22 | } |
| 21 | 23 | ||
| 22 | static inline void | 24 | static inline void |
| 23 | add_page_to_lru_list(struct zone *zone, struct page *page, enum lru_list l) | 25 | __add_page_to_lru_list(struct zone *zone, struct page *page, enum lru_list l, |
| 26 | struct list_head *head) | ||
| 24 | { | 27 | { |
| 25 | list_add(&page->lru, &zone->lru[l].list); | 28 | list_add(&page->lru, head); |
| 26 | __inc_zone_state(zone, NR_LRU_BASE + l); | 29 | __mod_zone_page_state(zone, NR_LRU_BASE + l, hpage_nr_pages(page)); |
| 27 | mem_cgroup_add_lru_list(page, l); | 30 | mem_cgroup_add_lru_list(page, l); |
| 28 | } | 31 | } |
| 29 | 32 | ||
| 30 | static inline void | 33 | static inline void |
| 34 | add_page_to_lru_list(struct zone *zone, struct page *page, enum lru_list l) | ||
| 35 | { | ||
| 36 | __add_page_to_lru_list(zone, page, l, &zone->lru[l].list); | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline void | ||
| 31 | del_page_from_lru_list(struct zone *zone, struct page *page, enum lru_list l) | 40 | del_page_from_lru_list(struct zone *zone, struct page *page, enum lru_list l) |
| 32 | { | 41 | { |
| 33 | list_del(&page->lru); | 42 | list_del(&page->lru); |
| 34 | __dec_zone_state(zone, NR_LRU_BASE + l); | 43 | __mod_zone_page_state(zone, NR_LRU_BASE + l, -hpage_nr_pages(page)); |
| 35 | mem_cgroup_del_lru_list(page, l); | 44 | mem_cgroup_del_lru_list(page, l); |
| 36 | } | 45 | } |
| 37 | 46 | ||
| @@ -66,7 +75,7 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
| 66 | l += LRU_ACTIVE; | 75 | l += LRU_ACTIVE; |
| 67 | } | 76 | } |
| 68 | } | 77 | } |
| 69 | __dec_zone_state(zone, NR_LRU_BASE + l); | 78 | __mod_zone_page_state(zone, NR_LRU_BASE + l, -hpage_nr_pages(page)); |
| 70 | mem_cgroup_del_lru_list(page, l); | 79 | mem_cgroup_del_lru_list(page, l); |
| 71 | } | 80 | } |
| 72 | 81 | ||
