From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751909AbdIUP1i (ORCPT ); Thu, 21 Sep 2017 11:27:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34528 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751652AbdIUP1f (ORCPT ); Thu, 21 Sep 2017 11:27:35 -0400 Date: Thu, 21 Sep 2017 08:27:28 -0700 From: "Paul E. McKenney" To: Mathieu Desnoyers Cc: Peter Zijlstra , linux-kernel , Boqun Feng , Andrew Hunter , maged michael , gromer , Avi Kivity , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Dave Watson , Alan Stern , Will Deacon , Andy Lutomirski , linux-arch Subject: Re: [RFC PATCH v2 1/2] membarrier: Provide register expedited private command Reply-To: paulmck@linux.vnet.ibm.com References: <20170918223648.31505-1-mathieu.desnoyers@efficios.com> <20170921121344.movkcoj6rm2s23ig@hirez.programming.kicks-ass.net> <196603634.15769.1506006703406.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <196603634.15769.1506006703406.JavaMail.zimbra@efficios.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17092115-0036-0000-0000-0000026E3863 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007773; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000231; SDB=6.00920284; UDB=6.00462417; IPR=6.00700506; BA=6.00005601; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017237; XFM=3.00000015; UTC=2017-09-21 15:27:32 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17092115-0037-0000-0000-000041D7AB2C Message-Id: <20170921152728.GF3521@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-21_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709210205 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 21, 2017 at 03:11:43PM +0000, Mathieu Desnoyers wrote: > ----- On Sep 21, 2017, at 8:13 AM, Peter Zijlstra peterz@infradead.org wrote: > > > On Mon, Sep 18, 2017 at 06:36:47PM -0400, Mathieu Desnoyers wrote: > >> @@ -3373,6 +3362,7 @@ static void __sched notrace __schedule(bool preempt) > >> > >> /* Also unlocks the rq: */ > >> rq = context_switch(rq, prev, next, &rf); > >> + membarrier_arch_sched_in(prev, next); > > > > That's wrong iirc; we just switched stacks, you cannot use @prev and > > @next. > > Yes, it did indeed explode spectacularly at boot in testing. RFC v3 fixes that. Good to hear that there is a useful test. ;-) Thanx, Paul > Thanks, > > Mathieu > > > > > >> } else { > >> rq->clock_update_flags &= ~(RQCF_ACT_SKIP|RQCF_REQ_SKIP); > > > rq_unlock_irq(rq, &rf); > > -- > Mathieu Desnoyers > EfficiOS Inc. > http://www.efficios.com >