Re: SLUB: Avoid atomic operation for slab_unlock

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Lameter
Date: Friday, October 19, 2007 - 4:20 am

Acked-by: Christoph Lameter <clameter@sgi.com>


Slub can use the non-atomic version to unlock because other flags will not
get modified with the lock held.

Signed-off-by: Nick Piggin <npiggin@suse.de>

---
 mm/slub.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c
+++ linux-2.6/mm/slub.c
@@ -1185,7 +1185,7 @@ static __always_inline void slab_lock(st
 
 static __always_inline void slab_unlock(struct page *page)
 {
-	bit_spin_unlock(PG_locked, &page->flags);
+	__bit_spin_unlock(PG_locked, &page->flags);
 }
 
 static __always_inline int slab_trylock(struct page *page)

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: SLUB: Avoid atomic operation for slab_unlock, Nick Piggin, (Thu Oct 18, 4:49 pm)
Re: SLUB: Avoid atomic operation for slab_unlock, Christoph Lameter, (Thu Oct 18, 6:21 pm)
Re: SLUB: Avoid atomic operation for slab_unlock, Nick Piggin, (Thu Oct 18, 6:56 pm)
Re: SLUB: Avoid atomic operation for slab_unlock, Christoph Lameter, (Thu Oct 18, 7:01 pm)
Re: SLUB: Avoid atomic operation for slab_unlock, Nick Piggin, (Thu Oct 18, 7:12 pm)
[IA64] Reduce __clear_bit_unlock overhead, Christoph Lameter, (Thu Oct 18, 8:26 pm)
Re: SLUB: Avoid atomic operation for slab_unlock, Christoph Lameter, (Fri Oct 19, 4:20 am)