Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754001AbbDPTCb (ORCPT ); Thu, 16 Apr 2015 15:02:31 -0400 Received: from casper.infradead.org ([85.118.1.10]:45045 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751938AbbDPTCU (ORCPT ); Thu, 16 Apr 2015 15:02:20 -0400 Date: Thu, 16 Apr 2015 21:02:08 +0200 From: Peter Zijlstra To: Ingo Molnar Cc: Steven Rostedt , Mel Gorman , Rik van Riel , Jason Low , Linus Torvalds , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Andrew Morton , Oleg Nesterov , Mike Galbraith , Frederic Weisbecker , Mel Gorman , Preeti U Murthy , hideaki.kimura@hp.com, Aswin Chandramouleeswaran , Scott J Norton Subject: Re: [PATCH 1/3] sched, timer: Remove usages of ACCESS_ONCE in the scheduler Message-ID: <20150416190208.GD23123@twins.programming.kicks-ass.net> References: <1429052986-9420-1-git-send-email-jason.low2@hp.com> <1429052986-9420-2-git-send-email-jason.low2@hp.com> <20150414195906.3adc89d9@gandalf.local.home> <1429063953.7039.88.camel@j-VirtualBox> <20150414224059.061ec5bf@grimm.local.home> <20150415074601.GC13449@gmail.com> <20150416165224.GD12676@worktop.ger.corp.intel.com> <20150416180227.GB17401@gmail.com> <20150416181535.GA23123@twins.programming.kicks-ass.net> <20150416182426.GA17852@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150416182426.GA17852@gmail.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1071 Lines: 24 On Thu, Apr 16, 2015 at 08:24:27PM +0200, Ingo Molnar wrote: > Yes ... but that still leaves this weird feeling that it's really > still a bit wrong because it's not proper parallel code, we just > reduced the probability of the remaining races radically. And it's not > like GCC (or any compiler) does load tearing or even store tearing > under normal -O2 for such code patterns, right? I think Paul once caught GCC doing something silly, but typically no. The re-loads however have been frequently observed. > > And its not like they really cost anything. > > That's true. > > Would it make sense to add a few comments to the seq field definition > site(s), about how it's supposed to be accessed - or to the > READ_ONCE()/WRITE_ONCE() sites, to keep people from wondering? For sure, can do a comment no problem. -- 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/