* [SLUB] change kmem_cache->align to record the real alignment
@ 2009-07-30 3:28 Zhang, Yanmin
2009-08-01 15:28 ` Pekka Enberg
0 siblings, 1 reply; 2+ messages in thread
From: Zhang, Yanmin @ 2009-07-30 3:28 UTC (permalink / raw)
To: Pekka Enberg; +Cc: Christoph Lameter, LKML
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@linux.intel.com>
---
--- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [SLUB] change kmem_cache->align to record the real alignment
2009-07-30 3:28 [SLUB] change kmem_cache->align to record the real alignment Zhang, Yanmin
@ 2009-08-01 15:28 ` Pekka Enberg
0 siblings, 0 replies; 2+ messages in thread
From: Pekka Enberg @ 2009-08-01 15:28 UTC (permalink / raw)
To: Zhang, Yanmin; +Cc: Christoph Lameter, LKML
Zhang, Yanmin wrote:
> 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@linux.intel.com>
>
> ---
>
> --- 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
>
>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-01 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 3:28 [SLUB] change kmem_cache->align to record the real alignment Zhang, Yanmin
2009-08-01 15:28 ` Pekka Enberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox