slub: change cmpxchg_double_slab in get_freelist() to __cmpxchg_double_slab
Subsystems (2)
PATCH 1/1 slub: change cmpxchg_double_slab in get_freelist() to __cmpxchg_double_slab
get_freelist() is only called by __slab_alloc with interrupt disabled, so __cmpxchg_double_slab is suitable.
mm/slub.c +1 -1
@@ -2176,7 +2176,7 @@ static inline void *get_freelist(struct kmem_cache *s, struct page *page) new.inuse = page->objects; new.frozen = freelist !=NULL ; - }while (!cmpxchg_double_slab (s, page, + }while (!__cmpxchg_double_slab (s, page, freelist, counters,NULL , new.counters,"get_freelist" ));
Signature · 8 lines
1.7.9.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Joonsoo Kim
get_freelist()is only called by__slab_allocwith interrupt disabled, so__cmpxchg_double_slabis suitable.Signed-off-by Joonsoo Kim <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
David Rientjes
reviewerQuoted 9 lines · David Rientjes
Quoted 4 lines · Joonsoo Kim
get_freelist()is only called by__slab_allocwith interrupt disabled, so__cmpxchg_double_slabis suitable.Signed-off-by Joonsoo Kim <[email protected]>Acked-by David Rientjes <[email protected]>
Pekka, did you want to pick this up so it can get into linux-next?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · David Rientjes
Quoted 8 lines · Joonsoo Kim
Quoted 5 lines
get_freelist()is only called by__slab_allocwith interrupt disabled, so__cmpxchg_double_slabis suitable.Signed-off-by Joonsoo Kim <[email protected]>Acked-by David Rientjes <[email protected]>
Quoted 1 line · David Rientjes
Pekka, did you want to pick this up so it can get into linux-next?
We now made get_freelist() *require* interrupts to be disabled which deserves a comment, no?
Also, what do we gain from patches like this? It's somewhat counterintuitive that we have a function with "cmpxchg" in it which is not always atomic (i.e. you need to have interrupts disabled).
IIRC, there was even a long rant about this by Linus but I'm unable to find it in my email archives.
Pekka
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 2 lines
We now made
get_freelist()*require* interrupts to be disabled which deserves a comment, no?
I resend patch(18 May) related to this comment.
See below link.
http://thread.gmane.org/gmane.linux.kernel.mm/78630/focus=78701
Quoted 3 lines
Also, what do we gain from patches like this? It's somewhat counterintuitive that we have a function with "cmpxchg" in it which is not always atomic (i.e. you need to have interrupts disabled).
Hmm...
This patch have a minor impact which saves a few instructions. But we already have a "__cmpxchg" version which works in irq disabled, so there is no reason for not applying it.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>