From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751942AbdHAQbN (ORCPT ); Tue, 1 Aug 2017 12:31:13 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52814 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751676AbdHAQbK (ORCPT ); Tue, 1 Aug 2017 12:31:10 -0400 Date: Tue, 1 Aug 2017 09:31:05 -0700 From: "Paul E. McKenney" To: Mathieu Desnoyers Cc: Stephen Rothwell , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Linux-Next Mailing List , linux-kernel , Andy Lutomirski Subject: Re: linux-next: manual merge of the rcu tree with the tip tree Reply-To: paulmck@linux.vnet.ibm.com References: <20170731135029.479025ea@canb.auug.org.au> <20170731161341.GG3730@linux.vnet.ibm.com> <1145333348.610.1501545845911.JavaMail.zimbra@efficios.com> <20170801040323.GP3730@linux.vnet.ibm.com> <788306045.812.1501561556636.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <788306045.812.1501561556636.JavaMail.zimbra@efficios.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17080116-2213-0000-0000-00000202E633 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007465; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000215; SDB=6.00896073; UDB=6.00448228; IPR=6.00676261; BA=6.00005506; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016482; XFM=3.00000015; UTC=2017-08-01 16:31:08 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17080116-2214-0000-0000-00005712EE94 Message-Id: <20170801163105.GY3730@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-08-01_09:,, 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-1706020000 definitions=main-1708010271 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 01, 2017 at 04:25:56AM +0000, Mathieu Desnoyers wrote: > ----- On Aug 1, 2017, at 12:03 AM, Paul E. McKenney paulmck@linux.vnet.ibm.com wrote: > > > On Tue, Aug 01, 2017 at 12:04:05AM +0000, Mathieu Desnoyers wrote: > >> ----- On Jul 31, 2017, at 12:13 PM, Paul E. McKenney paulmck@linux.vnet.ibm.com > >> wrote: > >> > >> > On Mon, Jul 31, 2017 at 01:50:29PM +1000, Stephen Rothwell wrote: > >> >> Hi Paul, > >> >> > >> >> Today's linux-next merge of the rcu tree got a conflict in: > >> >> > >> >> arch/x86/mm/tlb.c > >> >> > >> >> between commit: > >> >> > >> >> 94b1b03b519b ("x86/mm: Rework lazy TLB mode and TLB freshness tracking") > >> >> > >> >> from the tip tree and commit: > >> >> > >> >> d7713e8f8b23 ("membarrier: Expedited private command") > >> >> > >> >> from the rcu tree. > >> >> > >> >> I fixed it up (the former removed the comment and the load_cr3(), so I > >> >> just dropped the commend change in the latter) and can carry the fix as > >> >> necessary. This is now fixed as far as linux-next is concerned, but any > >> >> non trivial conflicts should be mentioned to your upstream maintainer > >> >> when your tree is submitted for merging. You may also want to consider > >> >> cooperating with the maintainer of the conflicting tree to minimise any > >> >> particularly complex conflicts. > >> > > >> > Thank you, Stephen! > >> > > >> > Mathieu, Peter, our commit log reads as if removal of load_cr3() would > >> > simply result in relying on the ordering provided by the atomic ops > >> > in switch_mm() for mm_cpumask(), so that only the commit log and the > >> > comment need changing. > >> > > >> > Please let me know if I am missing something here. > >> > >> I think you are right. Both load_cr3() and mm_cpumask update operations > >> (LOCK prefixed) provide the appropriate barriers on x86. So it's just a > >> matter of adapting the comment to the new reality. > > > > Like this? > > The updated comment in the commit message looks good, but I would be > tempted to add a comment in x86 switch_mm_irqs_off() stating the > following requirement just before the line invoking cpumask_set_cpu(): > > /* > * The full memory barrier implied by mm_cpumask update operations > * is required by the membarrier system call. > */ This looks good to me, but I will give the discussion another day or so to settle out. ;-) Thanx, Paul