Re: [PATCH] FLAT: allow arches to declare a larger alignment than the slab

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Frysinger
Date: Wednesday, May 26, 2010 - 12:23 am

On Wed, May 26, 2010 at 02:59, Geert Uytterhoeven wrote:

there are two issues.  first, the ARCH_SLAB_MINALIGN define is used to
align dynamically packed data on the stack.  the alignment of kmalloc
has no bearing here because things like the env get packed in and then
the ARCH_SLAB_MINALIGN value is manually used to re-align the stack.

second, the define is further used to manually set up alignment of the
data section after it has been mmapped in anonymously and made room
for shared library data.  this too has no kmalloc bearing because mmap
sucks things in by grabbing pages manually.


i believe that is correct.  FLAT behavior today provides alignment of
either sizeof(unsigned long) or ARCH_SLAB_MINALIGN.

i imagine something like this would work today because everyone
defines it to a constant:
-#ifdef ARCH_SLAB_MINALIGN
+#if defined(ARCH_SLAB_MINALIGN) && ARCH_SLAB_MINALIGN != 0
but this would break if someone tried using gcc sizeof/alignof/etc...
-mike
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] FLAT: allow arches to declare a larger alignme ..., Geert Uytterhoeven, (Tue May 25, 12:50 pm)
Re: [PATCH] FLAT: allow arches to declare a larger alignme ..., Geert Uytterhoeven, (Tue May 25, 11:59 pm)
Re: [PATCH] FLAT: allow arches to declare a larger alignme ..., Mike Frysinger, (Wed May 26, 12:23 am)
[PATCH 1/2 v2] FLAT: split the stack & data alignments, Mike Frysinger, (Wed May 26, 1:45 am)
[PATCH 2/2 v2] FLAT: tweak default stack alignment, Mike Frysinger, (Wed May 26, 1:45 am)
Re: [PATCH 1/2 v2] FLAT: split the stack & data alignments, David McCullough, (Thu May 27, 11:23 pm)
Re: [PATCH 2/2 v2] FLAT: tweak default stack alignment, David McCullough, (Thu May 27, 11:24 pm)
Re: [PATCH 2/2 v2] FLAT: tweak default stack alignment, Greg Ungerer, (Thu May 27, 11:39 pm)
[PATCH v3] FLAT: tweak default stack alignment, Mike Frysinger, (Sun Jun 6, 12:12 am)