Re: [PATCH] slob: push the min alignment to long long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2011-06-15 at 18:11 -0400, David Miller wrote:
> From: Matt Mackall <mpm@xxxxxxxxxxx>
> Date: Wed, 15 Jun 2011 15:55:55 -0500
> 
> > In general, I think the right thing is to require every arch to
> > explicitly document its alignment requirements via defines in the kernel
> > headers so that random hackers don't have to scour the internet for
> > datasheets on obscure architectures they don't care about.
> 
> Blink... because the compiler doesn't provide a portable way to
> do this, right? :-)

Because I, on x86, cannot deduce the alignment requirements of, say,
CRIS without doing significant research. So answering a question like
"are there any architectures where assumption X fails" is obnoxiously
hard, rather than being a grep.

I also don't think it's a given there's a portable way to deduce the
alignment requirements due to the existence of arch-specific quirks. If
an arch wants to kmalloc its weird crypto or SIMD context and those want
128-bit alignment, we're not going to want to embed that knowledge in
the generic code, but instead tweak an arch define.

Also note that not having generic defaults forces each new architectures
to (nominally) examine each assumption rather than discover they
inherited an incorrect default somewhere down the road.

-- 
Mathematics is the supreme nostalgia of our time.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]