* [PATCH] Comments about superflous flush_tlb_range calls.
@ 2003-11-21 17:49 Martin Schwidefsky
0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2003-11-21 17:49 UTC (permalink / raw)
To: linux-mm, linux-arch
Hi,
while searching for a s390 tlb flush problem I noticed some superflous
tlb flushes. One in zeromap_page_range, one in remap_page_range, and
another one in filemap_sync. The patch just adds comments but I think
these three flush_tlb_range calls can be removed.
blue skies,
Martin.
diffstat:
mm/memory.c | 6 ++++++
mm/msync.c | 4 ++++
2 files changed, 10 insertions(+)
diff -urN linux-2.6/mm/memory.c linux-2.6-s390/mm/memory.c
--- linux-2.6/mm/memory.c Fri Nov 21 16:18:48 2003
+++ linux-2.6-s390/mm/memory.c Fri Nov 21 16:20:25 2003
@@ -863,6 +863,9 @@
address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++;
} while (address && (address < end));
+ /*
+ * Why flush? zeromap_pte_range has a BUG_ON for !pte_none()
+ */
flush_tlb_range(vma, beg, end);
spin_unlock(&mm->page_table_lock);
return error;
@@ -944,6 +947,9 @@
from = (from + PGDIR_SIZE) & PGDIR_MASK;
dir++;
} while (from && (from < end));
+ /*
+ * Why flush? remap_pte_range has a BUG_ON for !pte_none()
+ */
flush_tlb_range(vma, beg, end);
spin_unlock(&mm->page_table_lock);
return error;
diff -urN linux-2.6/mm/msync.c linux-2.6-s390/mm/msync.c
--- linux-2.6/mm/msync.c Sat Oct 25 20:43:26 2003
+++ linux-2.6-s390/mm/msync.c Fri Nov 21 16:20:25 2003
@@ -115,6 +115,10 @@
address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++;
} while (address && (address < end));
+ /*
+ * Why flush ? filemap_sync_pte already flushed the tlbs with the
+ * dirty bits.
+ */
flush_tlb_range(vma, end - size, end);
spin_unlock(&vma->vm_mm->page_table_lock);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-11-21 17:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-21 17:49 [PATCH] Comments about superflous flush_tlb_range calls Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox