Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755376Ab1EDSUu (ORCPT ); Wed, 4 May 2011 14:20:50 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:56870 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753835Ab1EDSUt (ORCPT ); Wed, 4 May 2011 14:20:49 -0400 MIME-Version: 1.0 In-Reply-To: References: <20110504083559.GB25724@elte.hu> <20110504101932.GA3392@elte.hu> <20110504112746.GE8007@htj.dyndns.org> <20110504132022.GA17294@htj.dyndns.org> <20110504142532.GC17294@htj.dyndns.org> From: Linus Torvalds Date: Wed, 4 May 2011 11:20:22 -0700 Message-ID: Subject: Re: [block IO crash] Re: 2.6.39-rc5-git2 boot crashs To: Pekka Enberg Cc: Christoph Lameter , Thomas Gleixner , Tejun Heo , Ingo Molnar , Jens Axboe , Andrew Morton , werner , "H. Peter Anvin" , Linux Kernel Mailing List Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1633 Lines: 38 On Wed, May 4, 2011 at 8:53 AM, Linus Torvalds wrote: > > I'll take it. I'm just hoping to also get Werner's tested-by for it. > > I'm pretty confident this is it, though, so if I don't get it by the > end of the day I'll just apply it regardless with just a reported-by > from him. So I'm still waiting for the tested-by, but in the meantime I wrote a changelog. And part of that changelog reads: [ Btw, that whole "generic code defaults to no protection" design just sounds stupid - if the code needs no protection, there is no reason to use "cmpxchg_double" to begin with. So we should probably just remove the unprotected version entirely as pointless. - Linus ] which really sums up the whole thing. The current "this_cpu_cmpxchg_double()" implementation is just incredibly idiotic. There is absolutely _no_ point to having that function at all. Why does it exist? I can kind of see the point of the "preempt" version, although I'm not entirely convinced of that either. But the notion of having a "cmpxchg" function that isn't atomic even on a single CPU just makes me go "f*ck that, whoever wrote that is just a moron". If the function doesn't need atomicity, you're really better off just writing it out. It's going to be faster on pretty much all architectures using just regular load/store instructions. Linus -- 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/