Re: [PATCH v4 6/6] mm/pgtable: Don't accumulate addr during pgd prepopulate pmd

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

 



On 06/19/2013 07:52 AM, Wanpeng Li wrote:
> Changelog:
>  v2 - > v3:
>    * add Michal's Reviewed-by
> 
> The old codes accumulate addr to get right pmd, however,
> currently pmds are preallocated and transfered as a parameter,
> there is unnecessary to accumulate addr variable any more, this
> patch remove it.
> 
> Reviewed-by: Michal Hocko <mhocko@xxxxxxx>
> Signed-off-by: Wanpeng Li <liwanp@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx>

> ---
>  arch/x86/mm/pgtable.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
> index 17fda6a..dfa537a 100644
> --- a/arch/x86/mm/pgtable.c
> +++ b/arch/x86/mm/pgtable.c
> @@ -240,7 +240,6 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp)
>  static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
>  {
>  	pud_t *pud;
> -	unsigned long addr;
>  	int i;
>  
>  	if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */
> @@ -248,8 +247,7 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
>  
>  	pud = pud_offset(pgd, 0);
>  
> - 	for (addr = i = 0; i < PREALLOCATED_PMDS;
> -	     i++, pud++, addr += PUD_SIZE) {
> +	for (i = 0; i < PREALLOCATED_PMDS; i++, pud++) {
>  		pmd_t *pmd = pmds[i];
>  
>  		if (i >= KERNEL_PGD_BOUNDARY)


-- 
Thanks.
Zhang Yanfei

--
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]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]