From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932615AbbBZOBF (ORCPT ); Thu, 26 Feb 2015 09:01:05 -0500 Received: from smtprelay0020.hostedemail.com ([216.40.44.20]:50101 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932294AbbBZOBA (ORCPT ); Thu, 26 Feb 2015 09:01:00 -0500 X-Session-Marker: 6E657665747340676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2692:2731:3138:3139:3140:3141:3142:3353:3622:3743:3865:3866:3867:3870:3871:3872:3873:3874:4250:5007:6119:6261:7875:7901:7903:10004:10400:10848:10967:11232:11658:11914:12296:12517:12519:12740:13069:13141:13230:13255:13311:13357:14093:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: plate80_254598818e23a X-Filterd-Recvd-Size: 3124 Date: Thu, 26 Feb 2015 09:00:55 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: LKML , Ingo Molnar , Thomas Gleixner , Clark Williams , linux-rt-users , Mike Galbraith , "Paul E. McKenney" , =?UTF-8?B?SsO2cm4=?= Engel , Oleg Nesterov Subject: Re: [RFC][PATCH v2] sched/rt: Use IPI to trigger RT task push migration instead of pulling Message-ID: <20150226090055.2ed313e9@gandalf.local.home> In-Reply-To: <20150226134754.GS21418@twins.programming.kicks-ass.net> References: <20150224133946.3948c4b7@gandalf.local.home> <20150225103535.GJ5029@twins.programming.kicks-ass.net> <20150225105116.7fa03cc9@gandalf.local.home> <20150225171110.GO21418@twins.programming.kicks-ass.net> <20150225125015.6c5110ca@gandalf.local.home> <20150226074559.GP21418@twins.programming.kicks-ass.net> <20150226074301.0db88af3@grimm.local.home> <20150226134754.GS21418@twins.programming.kicks-ass.net> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 Feb 2015 14:47:54 +0100 Peter Zijlstra wrote: > > Thinking about this more, is it because a wmb just forces the CPU to > > write everything before this before it writes anything after it. That > > is, the writes themselves can happen at a much later time. Does a plain > > mb() work the same way if there are no reads required? > > No, neither smp_wmb nor smp_mb are required to flush the store buffers. Heh, that's what I said :-) "That is, the writes themselves can happen at a much later time." > > The only thing barriers do is guarantee order, this can be done by > flushing store buffers but it can also be done by making sure store > buffers flush writes in the 'right' order. > > Nor does an rmb help anything with ordering against a possible store > buffer flush. Again rmb only guarantees two loads are issued in that > particular order, it doesn't disallow the CPU speculating the load at > all. Yep understood. > > What about using atomic_t? > > > > Note, my latest code doesn't have any of this, but I just want to > > understand the semantics of these operations a bit better. > > Nope, atomic_t doesn't help here either. Atomics only make sure the RmW > cycle is atomic. Crummy. ;-) > > Note that even if wmb or mb did flush the store buffer, you would still > have a race here. Oh, it wasn't that I meant to remove the race. I was just trying to make that race smaller. But this is all academic now, as my last version doesn't do any of this. -- Steve