On Thu, 2011-06-16 at 09:59 +0300, Pekka Enberg wrote: > On Thu, Jun 16, 2011 at 1:53 AM, Matt Mackall <mpm@xxxxxxxxxxx> wrote: > >> 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. > > I don't agree. I think we should either provide defaults that work for > everyone and let architectures override them (which AFAICT Christoph's > patch does) or we flat out #error if architectures don't specify > alignment requirements. Uh, isn't the latter precisely what I say above? > The current solution seems to be the worst one > from practical point of view. Good, because no one's advocating for it. > This doesn't seem to be a *regression* per se so I'll queue > Christoph's patch for 3.1 and mark it for 3.0-stable. > Pekka -- 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>