Commit 5e9dace8 authored by Nick Piggin's avatar Nick Piggin Committed by Linus Torvalds

[PATCH] mm: page_alloc less atomics

More atomic operation removal from page allocator
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 67453911
...@@ -328,8 +328,8 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta); ...@@ -328,8 +328,8 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta);
#define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags)
#define PageCompound(page) test_bit(PG_compound, &(page)->flags) #define PageCompound(page) test_bit(PG_compound, &(page)->flags)
#define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) #define __SetPageCompound(page) __set_bit(PG_compound, &(page)->flags)
#define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) #define __ClearPageCompound(page) __clear_bit(PG_compound, &(page)->flags)
#ifdef CONFIG_SWAP #ifdef CONFIG_SWAP
#define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags)
......
...@@ -190,7 +190,7 @@ static void prep_compound_page(struct page *page, unsigned long order) ...@@ -190,7 +190,7 @@ static void prep_compound_page(struct page *page, unsigned long order)
for (i = 0; i < nr_pages; i++) { for (i = 0; i < nr_pages; i++) {
struct page *p = page + i; struct page *p = page + i;
SetPageCompound(p); __SetPageCompound(p);
set_page_private(p, (unsigned long)page); set_page_private(p, (unsigned long)page);
} }
} }
...@@ -209,7 +209,7 @@ static void destroy_compound_page(struct page *page, unsigned long order) ...@@ -209,7 +209,7 @@ static void destroy_compound_page(struct page *page, unsigned long order)
if (unlikely(!PageCompound(p) | if (unlikely(!PageCompound(p) |
(page_private(p) != (unsigned long)page))) (page_private(p) != (unsigned long)page)))
bad_page(page); bad_page(page);
ClearPageCompound(p); __ClearPageCompound(p);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment