From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932339AbWGGV7f (ORCPT ); Fri, 7 Jul 2006 17:59:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932340AbWGGV7f (ORCPT ); Fri, 7 Jul 2006 17:59:35 -0400 Received: from smtp.osdl.org ([65.172.181.4]:56987 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S932339AbWGGV7e (ORCPT ); Fri, 7 Jul 2006 17:59:34 -0400 Date: Fri, 7 Jul 2006 14:59:08 -0700 (PDT) From: Linus Torvalds To: "linux-os (Dick Johnson)" cc: Krzysztof Halasa , Ingo Molnar , Andrew Morton , Linux kernel , arjan@infradead.org Subject: Re: [patch] spinlocks: remove 'volatile' In-Reply-To: Message-ID: References: <20060705114630.GA3134@elte.hu><20060705101059.66a762bf.akpm@osdl.org><20060705193551.GA13070@elte.hu><20060705131824.52fa20ec.akpm@osdl.org><20060705204727.GA16615@elte.hu><20060705214502.GA27597@elte.hu><20060706081639.GA24179@elte.hu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 7 Jul 2006, linux-os (Dick Johnson) wrote: > > This is a bait and switch argument. The code was displayed to show > the compiler output, not an example of good coding practice. NO IT IS NOT. The whole point of my argument is simple: > > "'volatile' is useless. The things it did 30 years ago are much > > more complex these days, and need to be tied to much more > > detailed rules that depend on the actual particular problem, > > rather than one keyword to the compiler that doesn't actually > > give enough information for the compiler to do anything useful" And dammit, if you cannot admit that, then you're not worth discussing with. "volatile" is useless. It's a big hammer in a world where the nails aren't nails any more, they are screws, thumb-tacks, and spotwelding. It still makes a difference for code generation, OF COURSE. But it's the wrong thing to use. Linus