public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Fix a couple of issues with zap_pte_range and MMU gather
@ 2014-10-28 11:44 Will Deacon
  2014-10-28 11:44 ` [RFC PATCH 1/2] zap_pte_range: update addr when forcing flush after TLB batching faiure Will Deacon
  2014-10-28 11:44 ` [RFC PATCH 2/2] zap_pte_range: fix partial TLB flushing in response to a dirty pte Will Deacon
  0 siblings, 2 replies; 27+ messages in thread
From: Will Deacon @ 2014-10-28 11:44 UTC (permalink / raw)
  To: torvalds, peterz; +Cc: linux-kernel, linux, benh, Will Deacon

Hi all,

This patch series attempts to fix a couple of issues I've noticed with
zap_pte_range and the MMU gather code on arm64.

Ths first fix resolves a TLB range truncation, which I found by code
inspection (this is on the batch failure path, which doesn't appear to
be regularly exercised on my system).

For the second fix, I'd really appreciate some comments. The problem is
that the architecture TLB batching implementation may update the start
and end fields of the gather structure, so that they actually cover only
a subset of the initial range set up by tlb_gather_mmu (based on calls
to tlb_remove_tlb_entry). In the force_flush case, zap_pte_range sets
these fields directly, which can result in a negative range if the
architecture has also updated the end address. The patch here uses
min(end, addr) as the end of the first range, which creates a second
range from that address to the end of the region. This results in a
potential over-invalidation on arm64, but I can't think of anything
better without updating (at least) the x86 tlb.h implementation.

Ideally, we'd let the architecture set start/end during the call to
tlb_flush_mmu_tlbonly (arm64 does this already in tlb_flush).

Thoughts?

Will


Will Deacon (2):
  zap_pte_range: update addr when forcing flush after TLB batching
    faiure
  zap_pte_range: fix partial TLB flushing in response to a dirty pte

 mm/memory.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.1.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-11-10 13:56 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 11:44 [RFC PATCH 0/2] Fix a couple of issues with zap_pte_range and MMU gather Will Deacon
2014-10-28 11:44 ` [RFC PATCH 1/2] zap_pte_range: update addr when forcing flush after TLB batching faiure Will Deacon
2014-10-28 15:30   ` Linus Torvalds
2014-10-28 16:07     ` Will Deacon
2014-10-28 16:25       ` Linus Torvalds
2014-10-28 17:07         ` Will Deacon
2014-10-28 18:03           ` Linus Torvalds
2014-10-28 21:16         ` Benjamin Herrenschmidt
2014-10-28 21:32           ` Linus Torvalds
2014-10-28 21:40     ` Linus Torvalds
2014-10-29 19:47       ` Will Deacon
2014-10-29 21:11         ` Linus Torvalds
2014-10-29 21:27           ` Benjamin Herrenschmidt
2014-11-01 17:01             ` Linus Torvalds
2014-11-01 20:25               ` Benjamin Herrenschmidt
2014-11-03 17:56               ` Will Deacon
2014-11-03 18:05                 ` Linus Torvalds
2014-11-04 14:29         ` Catalin Marinas
2014-11-04 16:08           ` Linus Torvalds
2014-11-06 13:57             ` Catalin Marinas
2014-11-06 17:53               ` Linus Torvalds
2014-11-06 18:38                 ` Catalin Marinas
2014-11-06 21:29                   ` Linus Torvalds
2014-11-07 16:50                     ` Catalin Marinas
2014-11-10 13:56                       ` Will Deacon
2014-10-28 11:44 ` [RFC PATCH 2/2] zap_pte_range: fix partial TLB flushing in response to a dirty pte Will Deacon
2014-10-28 15:18   ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox