Skip to content

Commit

Permalink
powerpc/64s/radix: prefetch user address in update_mmu_cache
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
npiggin authored and mpe committed Jun 3, 2018
1 parent f569bd9 commit 68662f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion arch/powerpc/mm/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,10 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
*/
unsigned long access, trap;

if (radix_enabled())
if (radix_enabled()) {
prefetch((void *)address);
return;
}

/* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */
if (!pte_young(*ptep) || address >= TASK_SIZE)
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/mm/pgtable-book3s64.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
pmd_t *pmd)
{
return;
if (radix_enabled())
prefetch((void *)addr);
}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */

Expand Down

0 comments on commit 68662f8

Please sign in to comment.