Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755703Ab1EDTps (ORCPT ); Wed, 4 May 2011 15:45:48 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:47887 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754440Ab1EDTpr (ORCPT ); Wed, 4 May 2011 15:45:47 -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 12:38:28 -0700 Message-ID: Subject: Re: [block IO crash] Re: 2.6.39-rc5-git2 boot crashs To: Christoph Lameter Cc: Pekka Enberg , 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: 940 Lines: 27 On Wed, May 4, 2011 at 12:30 PM, Christoph Lameter wrote: > > The naming convention came about from the existing this_cpu_xxx > operations You're missing my point. An "add" operation makes sense even if it isn't atomic, because atomicity isn't a part of the definition of "add". But cmpxchg DOES NOT MAKE SENSE without atomicity guarantees. The whole operation is about atomicity. Having a version that isn't atomic is STUPID. It's misleading. It's _wrong_. In contrast, having a non-atomic "add" version is understandable. So when you say "naming convention", you're missing the much bigger naming convention. Namely the "cmpxchg" part! 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/