mm: fixlets
Subsystems (3)
cover mm: fixlets
Hi Andrew,
Max Filippov reported a generic MM issue with PTE/TLB coherency @ http://www.spinics.net/lists/linux-arch/msg21736.html
While the fix for issue is still being discussed, sending over a bunch mm fixlets which we found in due course.
Infact, 1/2 looks like stable material as orig code was flushing wrong range from TLB - wherever used.
Please consider applying.
Thx,
-Vineet
Vineet Gupta (2):
mm: Fix the TLB range flushed when __tlb_remove_page() runs out of
slots
mm: tlb_fast_mode check missing in tlb_finish_mmu()
mm/memory.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
Signature · 7 lines
1.7.10.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 1/2 mm: Fix the TLB range flushed when __tlb_remove_page() runs out of slots
zap_pte_range loops from @addr to @end. In the middle, if it runs out of batching slots, TLB entries needs to be flushed for @start to @interim, NOT @interim to @end.
Since ARC port doesn't use page free batching I can't test it myself but this seems like the right thing to do.
Observed this when working on a fix for the issue at thread:
http://www.spinics.net/lists/linux-arch/msg21736.html
--- mm/memory.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
mm/memory.c +6 -3
@@ -1110,6 +1110,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,spinlock_t *ptl;pte_t *start_pte;pte_t *pte; +unsigned long range_start = addr; again:init_rss_vec (rss);
@@ -1215,12 +1216,14 @@ again: force_flush =0 ;#ifdef HAVE_GENERIC_MMU_GATHER - tlb->start = addr; - tlb->end = end; + tlb->start = range_start; + tlb->end = addr;#endif tlb_flush_mmu (tlb); -if (addr != end) +if (addr != end) { + range_start = addr; goto again; + } }return addr;
Signature · 7 lines
1.7.10.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 2/2 mm: tlb_fast_mode check missing in tlb_finish_mmu()
In reply to Vineet GuptaThis removes some unused generated code for tlb_fast_mode() == true
--- mm/memory.c | 3 +++ 1 file changed, 3 insertions(+)
mm/memory.c +3 -0
@@ -269,6 +269,9 @@ void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long e/* keep the page table cache within bounds */ check_pgt_cache (); +if (tlb_fast_mode (tlb)) +return ; +for (batch = tlb->local.next; batch; batch = next) { next = batch->next;free_pages ((unsigned long )batch,0 );
Signature · 1 line
1.7.10.4