linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	akpm@linux-foundation.org, andi.kleen@intel.com,
	fengguang.wu@intel.com
Subject: Re: [PATCH 1/2] pagemap: add #ifdefs CONFIG_HUGETLB_PAGE on code walking hugetlb vma
Date: Fri, 19 Mar 2010 15:07:01 -0500	[thread overview]
Message-ID: <1269029221.9534.145.camel@calx> (raw)
In-Reply-To: <1268979996-12297-1-git-send-email-n-horiguchi@ah.jp.nec.com>

On Fri, 2010-03-19 at 15:26 +0900, Naoya Horiguchi wrote:
> If !CONFIG_HUGETLB_PAGE, pagemap_hugetlb_range() is never called.
> So put it (and its calling function) into #ifdef block.
> 
> Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>

Acked-by: Matt Mackall <mpm@selenic.com>

> ---
>  fs/proc/task_mmu.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 183f8ff..2a3ef17 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -652,6 +652,7 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
>  	return err;
>  }
>  
> +#ifdef CONFIG_HUGETLB_PAGE
>  static u64 huge_pte_to_pagemap_entry(pte_t pte, int offset)
>  {
>  	u64 pme = 0;
> @@ -695,6 +696,7 @@ static int pagemap_hugetlb_range(pte_t *pte, unsigned long addr,
>  
>  	return err;
>  }
> +#endif /* HUGETLB_PAGE */
>  
>  /*
>   * /proc/pid/pagemap - an array mapping virtual pages to pfns
> @@ -788,7 +790,9 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
>  
>  	pagemap_walk.pmd_entry = pagemap_pte_range;
>  	pagemap_walk.pte_hole = pagemap_pte_hole;
> +#ifdef CONFIG_HUGETLB_PAGE
>  	pagemap_walk.hugetlb_entry = pagemap_hugetlb_range;
> +#endif
>  	pagemap_walk.mm = mm;
>  	pagemap_walk.private = &pm;
>  



-- 
http://selenic.com : development and support for Mercurial and Linux


--
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>

      parent reply	other threads:[~2010-03-19 20:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19  6:26 [PATCH 1/2] pagemap: add #ifdefs CONFIG_HUGETLB_PAGE on code walking hugetlb vma Naoya Horiguchi
2010-03-19  6:29 ` KAMEZAWA Hiroyuki
2010-03-19  6:53   ` Naoya Horiguchi
2010-03-19  7:15     ` KAMEZAWA Hiroyuki
2010-03-19  8:30       ` Naoya Horiguchi
2010-03-19 20:07 ` Matt Mackall [this message]

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=1269029221.9534.145.camel@calx \
    --to=mpm@selenic.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi.kleen@intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=n-horiguchi@ah.jp.nec.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;
as well as URLs for NNTP newsgroup(s).