linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mm/slub: correct the comment in calculate_order()
@ 2015-09-29  1:06 Wei Yang
  2015-09-29  1:06 ` [PATCH 2/2] mm/slub: use get_order() instead of fls() Wei Yang
  0 siblings, 1 reply; 7+ messages in thread
From: Wei Yang @ 2015-09-29  1:06 UTC (permalink / raw)
  To: cl, penberg, rientjes; +Cc: linux-mm, Wei Yang

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 <weiyang@linux.vnet.ibm.com>
---
 mm/slub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/slub.c b/mm/slub.c
index f614b5d..a94b9f4 100644
--- 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;
-- 
2.5.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-21  8:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29  1:06 [PATCH 1/2] mm/slub: correct the comment in calculate_order() Wei Yang
2015-09-29  1:06 ` [PATCH 2/2] mm/slub: use get_order() instead of fls() Wei Yang
2015-09-29  8:08   ` Pekka Enberg
2015-09-30  2:23     ` Wei Yang
2015-10-21  7:42     ` Wei Yang
2015-10-21  8:07       ` Vlastimil Babka
2015-10-21  8:09         ` Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).