linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: linux-mm@kvack.org
Subject: Re: [RFC][PATCH 6/9] pagemap: give -1's a name
Date: Tue, 21 Aug 2007 16:27:10 -0500	[thread overview]
Message-ID: <20070821212710.GK30556@waste.org> (raw)
In-Reply-To: <20070821204254.E248E22C@kernel>

On Tue, Aug 21, 2007 at 01:42:54PM -0700, Dave Hansen wrote:
> 
> -1 is a magic number in /proc/$pid/pagemap.  It means that
> there was no pte present for a particular page.  We're
> going to be refining that a bit shortly, so give this a
> real name for now.
> 
> Signed-off-by: Dave Hansen <haveblue@us.ibm.com>

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

> ---
> 
>  lxc-dave/fs/proc/task_mmu.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff -puN fs/proc/task_mmu.c~give_-1s_a_name fs/proc/task_mmu.c
> --- lxc/fs/proc/task_mmu.c~give_-1s_a_name	2007-08-21 13:30:53.000000000 -0700
> +++ lxc-dave/fs/proc/task_mmu.c	2007-08-21 13:30:53.000000000 -0700
> @@ -509,6 +509,7 @@ struct pagemapread {
>  };
>  
>  #define PM_ENTRY_BYTES sizeof(unsigned long)
> +#define PM_NOT_PRESENT ((unsigned long)-1)
>  
>  static int add_to_pagemap(unsigned long addr, unsigned long pfn,
>  			  struct pagemapread *pm)
> @@ -533,7 +534,7 @@ static int pagemap_pte_range(pmd_t *pmd,
>  		if (addr < pm->next)
>  			continue;
>  		if (!pte_present(*pte))
> -			err = add_to_pagemap(addr, -1, pm);
> +			err = add_to_pagemap(addr, PM_NOT_PRESENT, pm);
>  		else
>  			err = add_to_pagemap(addr, pte_pfn(*pte), pm);
>  		if (err)
> _

-- 
Mathematics is the supreme nostalgia of our time.

--
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:[~2007-08-21 21:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21 20:42 [RFC][PATCH 1/9] /proc/pid/pagemap update Dave Hansen
2007-08-21 20:42 ` [RFC][PATCH 2/9] pagemap: remove file header Dave Hansen
2007-08-21 21:24   ` Matt Mackall
2007-08-21 20:42 ` [RFC][PATCH 3/9] pagemap: use PAGE_MASK/PAGE_ALIGN() Dave Hansen
2007-08-21 21:25   ` Matt Mackall
2007-08-21 20:42 ` [RFC][PATCH 4/9] pagemap: remove open-coded sizeof(unsigned long) Dave Hansen
2007-08-21 21:26   ` Matt Mackall
2007-08-21 20:42 ` [RFC][PATCH 5/9] introduce TASK_SIZE_OF() for all arches Dave Hansen
2007-08-21 20:42 ` [RFC][PATCH 6/9] pagemap: give -1's a name Dave Hansen
2007-08-21 21:27   ` Matt Mackall [this message]
2007-08-21 20:42 ` [RFC][PATCH 7/9] pagewalk: add handler for empty ranges Dave Hansen
2007-08-30  7:28   ` Nick Piggin
2007-09-03 12:32     ` Matt Mackall
2007-08-21 20:42 ` [RFC][PATCH 8/9] pagemap: use page walker pte_hole() helper Dave Hansen
2007-08-21 22:01   ` Matt Mackall
2007-08-21 22:38     ` Dave Hansen
2007-08-21 20:42 ` [RFC][PATCH 9/9] pagemap: export swap ptes Dave Hansen
2007-08-21 21:49   ` Matt Mackall
2007-08-21 22:26     ` Dave Hansen
2007-08-21 21:23 ` [RFC][PATCH 1/9] /proc/pid/pagemap update Matt Mackall
2007-08-21 21:26   ` Dave Hansen
2007-08-21 22:07 ` Matt Mackall

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=20070821212710.GK30556@waste.org \
    --to=mpm@selenic.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-mm@kvack.org \
    /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