Index: linux-2.6.18-rc4-mm3/include/linux/page-flags.h =================================================================== --- linux-2.6.18-rc4-mm3.orig/include/linux/page-flags.h 2006-08-31 15:51:02.951391641 -0700 +++ linux-2.6.18-rc4-mm3/include/linux/page-flags.h 2006-08-31 17:49:40.007595847 -0700 @@ -126,6 +126,8 @@ #define PageReferenced(page) test_bit(PG_referenced, &(page)->flags) #define SetPageReferenced(page) set_bit(PG_referenced, &(page)->flags) #define ClearPageReferenced(page) clear_bit(PG_referenced, &(page)->flags) +#define __SetPageReferenced(page) __set_bit(PG_referenced, &(page)->flags) +#define __ClearPageReferenced(page) __clear_bit(PG_referenced, &(page)->flags) #define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags) #define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags) @@ -155,6 +157,7 @@ #define PageActive(page) test_bit(PG_active, &(page)->flags) #define SetPageActive(page) set_bit(PG_active, &(page)->flags) +#define __SetPageActive(page) __set_bit(PG_active, &(page)->flags) #define ClearPageActive(page) clear_bit(PG_active, &(page)->flags) #define __ClearPageActive(page) __clear_bit(PG_active, &(page)->flags) Index: linux-2.6.18-rc4-mm3/mm/slabifier.c =================================================================== --- linux-2.6.18-rc4-mm3.orig/mm/slabifier.c 2006-08-31 17:47:18.063247515 -0700 +++ linux-2.6.18-rc4-mm3/mm/slabifier.c 2006-08-31 17:51:03.826631969 -0700 @@ -324,8 +324,8 @@ static void deactivate_slab(struct slab { s->active[cpu] = NULL; smp_wmb(); - ClearPageActive(page); - ClearPageReferenced(page); + __ClearPageActive(page); + __ClearPageReferenced(page); putback_slab(s, page); } @@ -480,7 +480,7 @@ redo: page->inuse++; object = page->freelist; page->freelist = next_object = object[page->offset]; - SetPageReferenced(page); + __SetPageReferenced(page); check_free_chain(s, page); slab_unlock(page); local_irq_restore(flags); @@ -522,16 +522,15 @@ new_slab: slab_lock(page); gotpage: - SetPageActive(page); if (s->active[cpu]) { /* We dropped the lock and someone else got a slab */ - ClearPageActive(page); slab_unlock(page); discard_slab(s, page); page = s->active[cpu]; } else s->active[cpu] = page; + __SetPageActive(page); check_free_chain(s, page); #ifdef CONFIG_SMP @@ -796,7 +795,7 @@ static int slab_shrink(struct slab_cache * Pin page so that slab_free will not free even if we * drop the slab lock. */ - SetPageActive(page); + __SetPageActive(page); if (page->inuse < s->objects && move_object) if (move_slab_objects(s, @@ -807,7 +806,7 @@ static int slab_shrink(struct slab_cache * This will put the slab on the front of the partial * list, the used list or free it. */ - ClearPageActive(page); + __ClearPageActive(page); putback_slab(s, page); } local_irq_restore(flags);