diff --git a/mm/memory.c b/mm/memory.c index f29e5ab0342d595c925b86e5f0a0b179ae85fbff..a1b93d9e444981445e1b8e5f50ff914492156b8f 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2899,8 +2899,16 @@ void do_set_pte(struct vm_area_struct *vma, unsigned long address, update_mmu_cache(vma, address, pte); } +/* + * If architecture emulates "accessed" or "young" bit without HW support, + * there is no much gain with fault_around. + */ static unsigned long fault_around_bytes __read_mostly = +#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS + PAGE_SIZE; +#else rounddown_pow_of_two(65536); +#endif #ifdef CONFIG_DEBUG_FS static int fault_around_bytes_get(void *data, u64 *val)