Skip to contentSkip to conversation

thp: remove unnecessary tlb flush for mprotect

PATCH Superseded Shaohua Li 2 participants 2 messages Oct 25, 2011 – Nov 10, 2011

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 2/5 thp: remove unnecessary tlb flush for mprotect

change_protection() will do TLB flush later, don't need duplicate tlb flush.

---
 mm/huge_memory.c |    1 -
 1 file changed, 1 deletion(-)
mm/huge_memory.c +0 -1
Index: linux/mm/huge_memory.c
===================================================================
@@ -1079,7 +1079,6 @@ int change_huge_pmd(struct vm_area_struc
 			entry = pmd_modify(entry, newprot);
 			set_pmd_at(mm, addr, pmd, entry);
 			spin_unlock(&vma->vm_mm->page_table_lock);
-			flush_tlb_range(vma, addr, addr + HPAGE_PMD_SIZE);
 			ret = 1;
 		}
 	} else

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Reviewed-by on v1 2/5
#1 lore raw
Quoted 12 lines · Shaohua Li

change_protection() will do TLB flush later, don't need duplicate tlb flush.

---
 mm/huge_memory.c |    1 -
 1 file changed, 1 deletion(-)

Index: linux/mm/huge_memory.c
===================================================================

mm/huge_memory.c int change_huge_pmd(struct vm_area_struc · line 1084

Quoted 7 lines
mm/huge_memory.c +0 -1
@@ -1079,7 +1079,6 @@ int change_huge_pmd(struct vm_area_struc
 			entry = pmd_modify(entry, newprot);
 			set_pmd_at(mm, addr, pmd, entry);
 			spin_unlock(&vma->vm_mm->page_table_lock);
-			flush_tlb_range(vma, addr, addr + HPAGE_PMD_SIZE);
 			ret = 1;
 		}
 	} else

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>