[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170801213652.GJ3730@linux.vnet.ibm.com>
Date: Tue, 1 Aug 2017 14:36:52 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Andy Lutomirski <luto@...nel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Linux-Next Mailing List <linux-next@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: manual merge of the rcu tree with the tip tree
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@...icios.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
Powered by blists - more mailing lists