mm/slub: correct the comment in calculate_order()
Subsystems (2)
PATCH 1/2 mm/slub: correct the comment in calculate_order()
In calculate_order(), it tries to calculate the best order by adjusting the fraction and min_objects. On each iteration on min_objects, fraction iterates on 16, 8, 4. Which means the acceptable waste increases with 1/16, 1/8, 1/4.
This patch corrects the comment according to the code.
--- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/slub.c +1 -1
@@ -2943,7 +2943,7 @@ static inline int calculate_order(int size, int reserved)* works by first attempting to generate a layout with * the best configuration and backing off gradually. * -* First we reduce the acceptable waste in a slab. Then +* First we increase the acceptable waste in a slab. Then * we reduce the minimum objects required in a slab. */ min_objects = slub_min_objects;
Signature · 7 lines
2.5.0 -- 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/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 2/2 mm/slub: use get_order() instead of fls()
get_order() is more easy to understand.
This patch just replaces it.
--- mm/slub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/slub.c +1 -2
@@ -2912,8 +2912,7 @@ static inline int slab_order(int size, int min_objects,if (order_objects (min_order, size, reserved) >MAX_OBJS_PER_PAGE )return get_order (size *MAX_OBJS_PER_PAGE ) -1 ; -for (order =max (min_order, -fls (min_objects * size -1 ) -PAGE_SHIFT ); +for (order =max (min_order,get_order (min_objects * size)); order <= max_order; order++) {unsigned long slab_size =PAGE_SIZE << order;
Signature · 7 lines
2.5.0 -- 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/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 2/2] mm/slub: use get_order() instead of fls()
Quoted 5 lines · Wei Yang
get_order()is more easy to understand.This patch just replaces it.
Signed-off-by Wei Yang <[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/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 2/2] mm/slub: use get_order() instead of fls()
Quoted 8 lines · Pekka Enberg
Quoted 5 lines · Wei Yang
get_order()is more easy to understand.This patch just replaces it.
Signed-off-by Wei Yang <[email protected]>Reviewed-by Pekka Enberg <[email protected]>
Thanks Pekka ~
Signature · 8 lines
Richard Yang Help you, Help me -- 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/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 2/2] mm/slub: use get_order() instead of fls()
In reply to Pekka EnbergQuoted 8 lines · Pekka Enberg
Quoted 5 lines · Wei Yang
get_order()is more easy to understand.This patch just replaces it.
Signed-off-by Wei Yang <[email protected]>Reviewed-by Pekka Enberg <[email protected]>
Is this patch accepted or not?
I don't receive an "Apply" or "Accepted", neither see it in a git tree. Not sure if I missed something or the process is different as I know?
Signature · 8 lines
Richard Yang Help you, Help me -- 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/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 2/2] mm/slub: use get_order() instead of fls()
Quoted 6 lines · Wei Yang
Quoted 5 lines · Pekka Enberg
Quoted 4 lines · Wei Yang
get_order()is more easy to understand.This patch just replaces it.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Wei Yang <[email protected]>Reviewed-by Pekka Enberg <[email protected]>Is this patch accepted or not?
I don't receive an "Apply" or "Accepted", neither see it in a git tree. Not sure if I missed something or the process is different as I know?
You should probably resend and include Andrew Morton in To/CC, instead of just linux-mm.
--
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/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 2/2] mm/slub: use get_order() instead of fls()
Quoted 11 lines · Vlastimil Babka
Quoted 10 lines · Wei Yang
Quoted 8 lines · Pekka Enberg
Quoted 5 lines · Wei Yang
get_order()is more easy to understand.This patch just replaces it.
Signed-off-by Wei Yang <[email protected]>Reviewed-by Pekka Enberg <[email protected]>
Quoted 7 lines
Quoted 4 lines
Is this patch accepted or not?
I don't receive an "Apply" or "Accepted", neither see it in a git tree. Not sure if I missed something or the process is different as I know?
You should probably resend and include Andrew Morton in To/CC, instead of just linux-mm.
Oh, got it.
Thanks
Signature · 8 lines
Richard Yang Help you, Help me -- 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/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>