[SLUB] change kmem_cache->align to record the real alignment

From: Zhang, Yanmin
Date: Wed Jul 29 2009 - 23:28:15 EST


kmem_cache->align records the original align parameter value specified
by users. Function calculate_alignment might change it based on cache
line size. So change kmem_cache->align correspondingly.

ïSigned-off-by: Zhang Yanmin <yanmin_zhang@xxxxxxxxxxxxxxx>

---

--- linux-2.6.31-rc3/mm/slub.c 2009-07-20 00:29:39.000000000 +0800
+++ linux-2.6.31-rc3_slubalign/mm/slub.c 2009-07-30 01:19:29.000000000 +0800
@@ -2400,6 +2400,7 @@ static int calculate_sizes(struct kmem_c
* on bootup.
*/
align = calculate_alignment(flags, align, s->objsize);
+ s->align = align;

/*
* SLUB stores one object immediately after another beginning from


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/