Skip to content

Commit 68662f8

Browse files
npigginmpe
authored andcommitted
powerpc/64s/radix: prefetch user address in update_mmu_cache
Prefetch the faulting address in update_mmu_cache to give the page table walker perhaps 100 cycles head start as locks are dropped and the interrupt completed. Signed-off-by: Nicholas Piggin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent f569bd9 commit 68662f8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

arch/powerpc/mm/mem.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,10 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
509509
*/
510510
unsigned long access, trap;
511511

512-
if (radix_enabled())
512+
if (radix_enabled()) {
513+
prefetch((void *)address);
513514
return;
515+
}
514516

515517
/* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */
516518
if (!pte_young(*ptep) || address >= TASK_SIZE)

arch/powerpc/mm/pgtable-book3s64.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
152152
void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
153153
pmd_t *pmd)
154154
{
155-
return;
155+
if (radix_enabled())
156+
prefetch((void *)addr);
156157
}
157158
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
158159

0 commit comments

Comments
 (0)