linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Jianguo Wu <wujianguo@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Minchan Kim <minchan.kim@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	qiuxishi <qiuxishi@huawei.com>
Subject: Re: [PATCH] mm: do_mincore() cleanup
Date: Thu, 05 Dec 2013 09:39:30 -0500	[thread overview]
Message-ID: <1386254370-ui1ehq60-mutt-n-horiguchi@ah.jp.nec.com> (raw)
In-Reply-To: <52A03EE4.6030609@huawei.com>

On Thu, Dec 05, 2013 at 04:52:52PM +0800, Jianguo Wu wrote:
> Two cleanups:
> 1. remove redundant codes for hugetlb pages.
> 2. end = pmd_addr_end(addr, end) restricts [addr, end) within PMD_SIZE,
>    this may increase do_mincore() calls, remove it.
> 
> Signed-off-by: Jianguo Wu <wujianguo@huawei.com>

Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>

Thanks!

Naoya

> ---
>  mm/mincore.c |    7 -------
>  1 files changed, 0 insertions(+), 7 deletions(-)
> 
> diff --git a/mm/mincore.c b/mm/mincore.c
> index da2be56..1016233 100644
> --- a/mm/mincore.c
> +++ b/mm/mincore.c
> @@ -225,13 +225,6 @@ static long do_mincore(unsigned long addr, unsigned long pages, unsigned char *v
>  
>  	end = min(vma->vm_end, addr + (pages << PAGE_SHIFT));
>  
> -	if (is_vm_hugetlb_page(vma)) {
> -		mincore_hugetlb_page_range(vma, addr, end, vec);
> -		return (end - addr) >> PAGE_SHIFT;
> -	}
> -
> -	end = pmd_addr_end(addr, end);
> -
>  	if (is_vm_hugetlb_page(vma))
>  		mincore_hugetlb_page_range(vma, addr, end, vec);
>  	else
> -- 
> 1.7.1
> 
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
> 

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

  reply	other threads:[~2013-12-05 14:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05  8:52 Jianguo Wu
2013-12-05 14:39 ` Naoya Horiguchi [this message]
2013-12-06  1:19   ` Jianguo Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1386254370-ui1ehq60-mutt-n-horiguchi@ah.jp.nec.com \
    --to=n-horiguchi@ah.jp.nec.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=qiuxishi@huawei.com \
    --cc=wujianguo@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox