[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1328760980-3460-1-git-send-email-n-horiguchi@ah.jp.nec.com>
Date: Wed, 8 Feb 2012 23:16:20 -0500
From: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: Naoya Horiguchi <n-horiguchi@...jp.nec.com>, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
David Rientjes <rientjes@...gle.com>,
Andi Kleen <andi@...stfloor.org>,
Wu Fengguang <fengguang.wu@...el.com>,
Andrea Arcangeli <aarcange@...hat.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] pagemap: introduce data structure for pagemap entry
On Thu, Feb 09, 2012 at 11:29:36AM +0900, KAMEZAWA Hiroyuki wrote:
> On Wed, 8 Feb 2012 10:51:42 -0500
> Naoya Horiguchi <n-horiguchi@...jp.nec.com> wrote:
>
> > Currently a local variable of pagemap entry in pagemap_pte_range()
> > is named pfn and typed with u64, but it's not correct (pfn should
> > be unsigned long.)
>
> Does this means "the name 'pfn' implies unsigned long, usually. And
> this usage is confusing." ?
Yes, that is one I meant.
And another meaning is that this variable can contain not only page frame
number but also other information about page state. The format of pagemap
entry is described in a comment above pagemap_read() like this
* Bits 0-55 page frame number (PFN) if present
* Bits 0-4 swap type if swapped
* Bits 5-55 swap offset if swapped
* Bits 55-60 page shift (page size = 1<<page shift)
* Bit 61 reserved for future use
* Bit 62 page swapped
* Bit 63 page present
*
* If the page is not present but in swap, then the PFN contains an
* encoding of the swap file number and the page's offset into the
* swap. Unmapped pages return a null PFN. This allows determining
* precisely which pages are mapped (or in swap) and comparing mapped
* pages between processes.
. So the name 'pfn' does not exactly match what it represents.
> > This patch introduces special type for pagemap entry and replace
> > code with it.
> >
> > Signed-off-by: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> >
>
> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists