mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux-foundation.org>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Russell King <linux@arm.linux.org.uk>,
	Kukjin Kim <kgene.kim@samsung.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-mm <linux-mm@kvack.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Mel Gorman <mel@csn.ul.ie>, Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH] Tight check of pfn_valid on sparsemem - v4
Date: Mon, 26 Jul 2010 11:40:44 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1007261136160.5438@router.home> (raw)
In-Reply-To: <1280159163-23386-1-git-send-email-minchan.kim@gmail.com>

On Tue, 27 Jul 2010, Minchan Kim wrote:

> This patch registers address of mem_section to memmap itself's page struct's
> pg->private field. This means the page is used for memmap of the section.
> Otherwise, the page is used for other purpose and memmap has a hole.

What if page->private just happens to be the value of the page struct?
Even if that is not possible today, someday someone may add new
functionality to the kernel where page->pivage == page is used for some
reason.

Checking for PG_reserved wont work?

> +void mark_valid_memmap(unsigned long start, unsigned long end);
> +
> +#ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL
> +static inline int memmap_valid(unsigned long pfn)
> +{
> +	struct page *page = pfn_to_page(pfn);
> +	struct page *__pg = virt_to_page(page);
> +	return page_private(__pg) == (unsigned long)__pg;

Hmmm.. hmmm....

  reply	other threads:[~2010-07-26 16:47 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26 15:46 Minchan Kim
2010-07-26 16:40 ` Christoph Lameter [this message]
2010-07-26 22:47   ` Minchan Kim
2010-07-27  5:55 ` miltonm
2010-07-27  6:11   ` Minchan Kim
2010-07-27  8:12     ` Milton Miller
2010-07-27  8:13       ` KAMEZAWA Hiroyuki
2010-07-27 10:01         ` Minchan Kim
2010-07-27 14:34           ` Christoph Lameter
2010-07-27 22:33             ` Minchan Kim
2010-07-28 15:14               ` Christoph Lameter
2010-07-28 15:56                 ` Minchan Kim
2010-07-28 17:02                   ` Christoph Lameter
2010-07-28 22:57                     ` Minchan Kim
2010-07-29 15:46                       ` Christoph Lameter
2010-07-29 16:18                         ` Minchan Kim
2010-07-29 16:47                           ` Christoph Lameter
2010-07-29 17:03                             ` Minchan Kim
2010-07-29 17:30                               ` Christoph Lameter
2010-07-29 18:33                                 ` Russell King - ARM Linux
2010-07-29 19:55                                   ` Christoph Lameter
2010-07-29 21:13                                     ` Russell King - ARM Linux
2010-07-29 20:55                                   ` Dave Hansen
2010-07-29 22:14                                     ` Russell King - ARM Linux
2010-07-29 22:28                                       ` Christoph Lameter
2010-07-30  0:38                                       ` Dave Hansen
2010-07-30  9:43                                         ` Minchan Kim
2010-07-30 12:48                                         ` Christoph Lameter
2010-07-30 15:43                                           ` Dave Hansen
2010-07-31 15:30                                           ` Russell King - ARM Linux
2010-08-02 15:48                                             ` Christoph Lameter
2010-07-30  9:32                                     ` Minchan Kim
2010-07-31 10:38                                       ` Russell King - ARM Linux
2010-08-11 15:31                                         ` Dave Hansen
2010-07-27  9:56       ` Minchan Kim

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=alpine.DEB.2.00.1007261136160.5438@router.home \
    --to=cl@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.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

all inboxes | Powered by JetHome®