Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1701523

Re: linux-next: manual merge of the rcu tree with the tip tree

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: linux-next: manual merge of the rcu tree with the tip tree
Date Tue, 01 Aug 2017 23:40:02 +0200
Message-ID <u9N3s-Rr-21@gated-at.bofh.it> (permalink)
References <u9a25-15b-9@gated-at.bofh.it> <u9lAe-8rv-21@gated-at.bofh.it> <u9sV4-4wv-7@gated-at.bofh.it> <u9wFj-6QY-1@gated-at.bofh.it> <u9FIC-4Dg-11@gated-at.bofh.it> <u9G1Z-4YZ-43@gated-at.bofh.it> <u9GbE-52o-21@gated-at.bofh.it>
X-Original-To Andy Lutomirski <luto@kernel.org>
Reply-To paulmck@linux.vnet.ibm.com
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
X-Tm-As-Gconf 00
X-Cbid 17080121-0052-0000-0000-00000248FA29
X-Ibm-Spammodules-Versions BY=3.00007467; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000215; SDB=6.00896175; UDB=6.00448289; IPR=6.00676363; 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.00016485; XFM=3.00000015; UTC=2017-08-01 21:36:55
X-Ibm-Av-Detection SAVI=unused REMOTE=unused XFE=unused
X-Cbparentid 17080121-0053-0000-0000-000051873B63
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:,, definitions=2017-08-01_13:,, 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-1708010346
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 30
Organization linux.* mail to news gateway
X-Original-Cc Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Stephen Rothwell <sfr@canb.auug.org.au>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>, Peter Zijlstra <peterz@infradead.org>, Linux-Next Mailing List <linux-next@vger.kernel.org>, linux-kernel <linux-kernel@vger.kernel.org>
X-Original-Date Tue, 1 Aug 2017 14:36:52 -0700
X-Original-Message-ID <20170801213652.GJ3730@linux.vnet.ibm.com>
X-Original-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> <CALCETrWO5g5HuNpxa4Phxg--fDPWpuCVDTVr-UfuzrK5wn-8dQ@mail.gmail.com> <1639218309.1091.1501596152868.JavaMail.zimbra@efficios.com> <CALCETrWWx8h=74td8bxbR6KZJN2GLAZ_jz9G-x9Q+Vn2AHSijQ@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1701523

Show key headers only | View raw


On Tue, Aug 01, 2017 at 07:15:40AM -0700, Andy Lutomirski wrote:
> On Tue, Aug 1, 2017 at 7:02 AM, Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com> wrote:
> > /*
> >  * The full memory barrier implied by mm_cpumask update operations
> >  * is required by the membarrier system call.
> >  */
> >
> > What we want to order here is:
> >
> > prev userspace memory accesses
> > schedule
> >   <full mb> (it's already there) [A]
> >   update to rq->curr changing the rq->curr->mm value
> >   <full mb> (provided by mm_cpumask updates in switch_mm on x86) [B]
> 
> If I understand this right, the issue with relying on CR3 writes is
> that the target CPU could switch to a kernel thread and back to the
> same user mm white the membarrier caller is reading its mm, right?

The thing that got my attention was your patch removing the load_cr3().
Ah, looking closer, it appears that you have not eliminated the CR3
load, but just renamed it to write_cr3().  So if there is always still
a CR3 load, you are right, I should be able to simply move the comment.
Or let you insert the comment into your patch?

So there is still always a CR3 load, correct?  (Hey, I thought that
maybe x86 was moving to ASIDs or some such.)

							Thanx, Paul

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: linux-next: manual merge of the rcu tree with the tip tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-31 18:20 +0200
  Re: linux-next: manual merge of the rcu tree with the tip tree Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-08-01 02:10 +0200
    Re: linux-next: manual merge of the rcu tree with the tip tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-08-01 06:10 +0200
      Re: linux-next: manual merge of the rcu tree with the tip tree Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-08-01 06:30 +0200
        Re: linux-next: manual merge of the rcu tree with the tip tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-08-01 18:40 +0200
      Re: linux-next: manual merge of the rcu tree with the tip tree Andy Lutomirski <luto@kernel.org> - 2017-08-01 15:50 +0200
        Re: linux-next: manual merge of the rcu tree with the tip tree Peter Zijlstra <peterz@infradead.org> - 2017-08-01 16:00 +0200
          Re: linux-next: manual merge of the rcu tree with the tip tree Peter Zijlstra <peterz@infradead.org> - 2017-08-01 16:20 +0200
            Re: linux-next: manual merge of the rcu tree with the tip tree Andy Lutomirski <luto@kernel.org> - 2017-08-01 16:20 +0200
        Re: linux-next: manual merge of the rcu tree with the tip tree Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-08-01 16:10 +0200
          Re: linux-next: manual merge of the rcu tree with the tip tree Andy Lutomirski <luto@kernel.org> - 2017-08-01 16:20 +0200
            Re: linux-next: manual merge of the rcu tree with the tip tree Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2017-08-01 17:50 +0200
            Re: linux-next: manual merge of the rcu tree with the tip tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-08-01 23:40 +0200

csiph-web