Commit 6fefc8fa authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] s390: superflous flush_tlb_range calls.

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

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.
parent 269fa3a4
...@@ -863,6 +863,9 @@ int zeromap_page_range(struct vm_area_struct *vma, unsigned long address, unsign ...@@ -863,6 +863,9 @@ int zeromap_page_range(struct vm_area_struct *vma, unsigned long address, unsign
address = (address + PGDIR_SIZE) & PGDIR_MASK; address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++; dir++;
} while (address && (address < end)); } while (address && (address < end));
/*
* Why flush? zeromap_pte_range has a BUG_ON for !pte_none()
*/
flush_tlb_range(vma, beg, end); flush_tlb_range(vma, beg, end);
spin_unlock(&mm->page_table_lock); spin_unlock(&mm->page_table_lock);
return error; return error;
...@@ -944,6 +947,9 @@ int remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned lo ...@@ -944,6 +947,9 @@ int remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned lo
from = (from + PGDIR_SIZE) & PGDIR_MASK; from = (from + PGDIR_SIZE) & PGDIR_MASK;
dir++; dir++;
} while (from && (from < end)); } while (from && (from < end));
/*
* Why flush? remap_pte_range has a BUG_ON for !pte_none()
*/
flush_tlb_range(vma, beg, end); flush_tlb_range(vma, beg, end);
spin_unlock(&mm->page_table_lock); spin_unlock(&mm->page_table_lock);
return error; return error;
......
...@@ -113,6 +113,10 @@ static int filemap_sync(struct vm_area_struct * vma, unsigned long address, ...@@ -113,6 +113,10 @@ static int filemap_sync(struct vm_area_struct * vma, unsigned long address,
address = (address + PGDIR_SIZE) & PGDIR_MASK; address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++; dir++;
} while (address && (address < end)); } while (address && (address < end));
/*
* Why flush ? filemap_sync_pte already flushed the tlbs with the
* dirty bits.
*/
flush_tlb_range(vma, end - size, end); flush_tlb_range(vma, end - size, end);
spin_unlock(&vma->vm_mm->page_table_lock); spin_unlock(&vma->vm_mm->page_table_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment