Re: [PATCH] mm/mprotect: Add a cond_resched() inside change_pte_range()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 14-12-17 10:40:21, Anshuman Khandual wrote:
[...]
> diff --git a/mm/mprotect.c b/mm/mprotect.c
> index ec39f73..4fce0f5 100644
> --- a/mm/mprotect.c
> +++ b/mm/mprotect.c
> @@ -144,6 +144,7 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
>  	} while (pte++, addr += PAGE_SIZE, addr != end);
>  	arch_leave_lazy_mmu_mode();
>  	pte_unmap_unlock(pte - 1, ptl);
> +	cond_resched();
>  
>  	return pages;
>  }

I would put this one level up to change_pmd_range to catch large THP
backed regions. Something we do in zap_pmd_range. Other than that the
patch makes sense to me.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux