From: Will Deacon <will.deacon@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: torvalds@linux-foundation.org, oleg@redhat.com,
paulmck@linux.vnet.ibm.com, benh@kernel.crashing.org,
mpe@ellerman.id.au, npiggin@gmail.com,
linux-kernel@vger.kernel.org, mingo@kernel.org,
stern@rowland.harvard.edu, Russell King <linux@armlinux.org.uk>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Ralf Baechle <ralf@linux-mips.org>,
Vineet Gupta <vgupta@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH -v2 1/4] mm: Rework {set,clear,mm}_tlb_flush_pending()
Date: Thu, 3 Aug 2017 16:27:36 +0100 [thread overview]
Message-ID: <20170803152735.GC20783@arm.com> (raw)
In-Reply-To: <20170802114030.020058451@infradead.org>
On Wed, Aug 02, 2017 at 01:38:38PM +0200, Peter Zijlstra wrote:
> Commit:
>
> af2c1401e6f9 ("mm: numa: guarantee that tlb_flush_pending updates are visible before page table updates")
>
> added smp_mb__before_spinlock() to set_tlb_flush_pending(). I think we
> can solve the same problem without this barrier.
>
> If instead we mandate that mm_tlb_flush_pending() is used while
> holding the PTL we're guaranteed to observe prior
> set_tlb_flush_pending() instances.
>
> For this to work we need to rework migrate_misplaced_transhuge_page()
> a little and move the test up into do_huge_pmd_numa_page().
>
> NOTE: this relies on flush_tlb_range() to guarantee:
>
> (1) it ensures that prior page table updates are visible to the
> page table walker and
> (2) it ensures that subsequent memory accesses are only made
> visible after the invalidation has completed
Works for me:
Acked-by: Will Deacon <will.deacon@arm.com>
Will
next prev parent reply other threads:[~2017-08-03 15:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-02 11:38 [PATCH -v2 0/4] Getting rid of smp_mb__before_spinlock Peter Zijlstra
2017-08-02 11:38 ` [PATCH -v2 1/4] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra
2017-08-02 13:00 ` Mel Gorman
2017-08-02 13:05 ` Peter Zijlstra
2017-08-02 13:52 ` Mel Gorman
2017-08-02 14:16 ` Peter Zijlstra
2017-08-02 13:00 ` ARC stuff (was Re: [PATCH -v2 1/4] mm: Rework {set,clear,mm}_tlb_flush_pending()) Vineet Gupta
2017-08-02 13:00 ` Vineet Gupta
2017-08-02 13:17 ` Peter Zijlstra
2017-08-02 13:17 ` Peter Zijlstra
2017-08-11 14:15 ` Peter Zijlstra
2017-08-11 14:15 ` Peter Zijlstra
2017-08-03 15:27 ` Will Deacon [this message]
2017-08-11 9:45 ` [PATCH -v2 1/4] mm: Rework {set,clear,mm}_tlb_flush_pending() Peter Zijlstra
2017-08-02 11:38 ` [PATCH -v2 2/4] overlayfs: Remove smp_mb__before_spinlock() usage Peter Zijlstra
2017-08-02 11:38 ` [PATCH -v2 3/4] locking: Introduce smp_mb__after_spinlock() Peter Zijlstra
2017-08-03 15:28 ` Will Deacon
2017-08-03 15:43 ` Nicholas Piggin
2017-08-02 11:38 ` [PATCH -v2 4/4] locking: Remove smp_mb__before_spinlock() Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170803152735.GC20783@arm.com \
--to=will.deacon@arm.com \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=ralf@linux-mips.org \
--cc=riel@redhat.com \
--cc=stern@rowland.harvard.edu \
--cc=torvalds@linux-foundation.org \
--cc=vgupta@synopsys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.