diff options
author | Nick Piggin <npiggin@suse.de> | 2006-03-22 03:08:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 10:53:57 -0500 |
commit | 5e9dace8d386def04219134d7160e8a778824764 (patch) | |
tree | d74ca57577cc4872eb6bcf609e3c7f7d1a39fdf6 | |
parent | 674539115cc88473f623581e1d53c0e2ecef2179 (diff) |
[PATCH] mm: page_alloc less atomics
More atomic operation removal from page allocator
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/linux/page-flags.h | 4 | ||||
-rw-r--r-- | mm/page_alloc.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index da71d63df465..76c7ffdd0424 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -328,8 +328,8 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta); | |||
328 | #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) | 328 | #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) |
329 | 329 | ||
330 | #define PageCompound(page) test_bit(PG_compound, &(page)->flags) | 330 | #define PageCompound(page) test_bit(PG_compound, &(page)->flags) |
331 | #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) | 331 | #define __SetPageCompound(page) __set_bit(PG_compound, &(page)->flags) |
332 | #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) | 332 | #define __ClearPageCompound(page) __clear_bit(PG_compound, &(page)->flags) |
333 | 333 | ||
334 | #ifdef CONFIG_SWAP | 334 | #ifdef CONFIG_SWAP |
335 | #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) | 335 | #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 61775866ea18..102919851353 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -190,7 +190,7 @@ static void prep_compound_page(struct page *page, unsigned long order) | |||
190 | for (i = 0; i < nr_pages; i++) { | 190 | for (i = 0; i < nr_pages; i++) { |
191 | struct page *p = page + i; | 191 | struct page *p = page + i; |
192 | 192 | ||
193 | SetPageCompound(p); | 193 | __SetPageCompound(p); |
194 | set_page_private(p, (unsigned long)page); | 194 | set_page_private(p, (unsigned long)page); |
195 | } | 195 | } |
196 | } | 196 | } |
@@ -209,7 +209,7 @@ static void destroy_compound_page(struct page *page, unsigned long order) | |||
209 | if (unlikely(!PageCompound(p) | | 209 | if (unlikely(!PageCompound(p) | |
210 | (page_private(p) != (unsigned long)page))) | 210 | (page_private(p) != (unsigned long)page))) |
211 | bad_page(page); | 211 | bad_page(page); |
212 | ClearPageCompound(p); | 212 | __ClearPageCompound(p); |
213 | } | 213 | } |
214 | } | 214 | } |
215 | 215 | ||