From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with SMTP id 110B86B0012 for ; Thu, 16 Jun 2011 11:23:48 -0400 (EDT) Subject: Re: [PATCH] slob: push the min alignment to long long From: Matt Mackall In-Reply-To: References: <1308169466.15617.378.camel@calx> <1308171355.15617.401.camel@calx> <20110615.181148.650483947691740732.davem@davemloft.net> <1308178420.15617.447.camel@calx> Content-Type: text/plain; charset="UTF-8" Date: Thu, 16 Jun 2011 10:23:43 -0500 Message-ID: <1308237823.15617.451.camel@calx> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Pekka Enberg Cc: David Miller , sebastian@breakpoint.cc, cl@linux-foundation.org, linux-mm@kvack.org, netfilter@vger.kernel.org On Thu, 2011-06-16 at 09:59 +0300, Pekka Enberg wrote: > On Thu, Jun 16, 2011 at 1:53 AM, Matt Mackall 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@kvack.org. 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: email@kvack.org