Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755510Ab1EDVlE (ORCPT ); Wed, 4 May 2011 17:41:04 -0400 Received: from www.linutronix.de ([62.245.132.108]:46135 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753586Ab1EDVlC (ORCPT ); Wed, 4 May 2011 17:41:02 -0400 Date: Wed, 4 May 2011 23:40:33 +0200 (CEST) From: Thomas Gleixner To: Linus Torvalds cc: Christoph Lameter , Pekka Enberg , Tejun Heo , Ingo Molnar , Jens Axboe , Andrew Morton , werner , "H. Peter Anvin" , Linux Kernel Mailing List Subject: Re: [block IO crash] Re: 2.6.39-rc5-git2 boot crashs In-Reply-To: Message-ID: References: <20110504132022.GA17294@htj.dyndns.org> <20110504142532.GC17294@htj.dyndns.org> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1456 Lines: 35 On Wed, 4 May 2011, Linus Torvalds wrote: > On Wed, May 4, 2011 at 2:06 PM, Linus Torvalds > wrote: > > > > The problem is that cmpxchg *IS*NOT*AN*CMPXCHG*AT*ALL*. Not even on UP. > > Btw, the really sad thing is that as far as I can tell, the > cmpxchg64_local() function that we define actually gets this *right*, > with a helper function that actually works (and disables interrupts) > and all the alternative_io() stuff to then use the right instruction > automatically if the CPU supports it, rather than making it a > hardcoded decision. > > But we don't use it, because the "percpu_cmpxchg8b_double()" code > rolls its own inferior version, and has slightly different semantics > (ie the whole "return value success" thing). Yeah, I tripped over that as well. And the new shiny extra CONFIG_CMPXCHG_DOUBLE misfeature Christoph nailed together is just ignoring it as well. It's just more useless #ifdef and CONFIG bloat. That whole this_cpu_* stuff seems to be designed by committee. A quick grep shows that max. 10% of the implemented macro hell is actually used. Can we get rid of all unused ones and bring them back when they are actually required? Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/