mm/slub: correct the comment in calculate_order()
authorWei Yang <[email protected]>
Fri, 6 Nov 2015 02:45:46 +0000 (18:45 -0800)
committerLinus Torvalds <[email protected]>
Fri, 6 Nov 2015 03:34:48 +0000 (19:34 -0800)
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.

Signed-off-by: Wei Yang <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/slub.c

index f614b5dc396bc17b43cebacd97383243bbb03b99..a94b9f46261b020a5f0aeee1d82a3aee1b4eb785 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -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;