All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>, Minchan Kim <minchan@kernel.org>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mel@csn.ul.ie>, Wen Congyang <wency@cn.fujitsu.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [RFC v2] memory-hotplug: remove MIGRATE_ISOLATE from free_area->free_list
Date: Thu, 06 Sep 2012 14:56:45 +0200	[thread overview]
Message-ID: <xa1tmx139unm.fsf@mina86.com> (raw)
In-Reply-To: <50486658.5000305@cn.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

>> +		pfn = page_to_pfn(page);
>> +		if (pfn >= end_pfn)
>> +			return false;
>> +		if (pfn >= start_pfn)
>> +			goto found;

On Thu, Sep 06 2012, Lai Jiangshan wrote:
> this test is wrong.
>
> use this:
>
> if ((pfn <= start_pfn) && (start_pfn < pfn + (1UL << page_order(page))))
> 	goto found;
>
> if (pfn > start_pfn)
> 	return false;

	if (pfn > start_pfn)
		return false;
	if (pfn + (1UL << page_order(page)) > start_pfn)
		goto found;

>> +	}
>> +	return false;
>> +
>> +	list_for_each_entry_continue(page, &isolated_pages, lru) {
>> +		if (page_to_pfn(page) != next_pfn)
>> +			return false;

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2012-09-06 12:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06  2:53 [RFC v2] memory-hotplug: remove MIGRATE_ISOLATE from free_area->free_list Minchan Kim
2012-09-06  2:53 ` Minchan Kim
2012-09-06  8:14 ` Lai Jiangshan
2012-09-06  8:14   ` Lai Jiangshan
2012-09-06  8:18   ` Minchan Kim
2012-09-06  8:18     ` Minchan Kim
2012-09-06  8:57     ` Lai Jiangshan
2012-09-06  8:57       ` Lai Jiangshan
2012-09-06 12:51       ` Michal Nazarewicz
2012-09-06  9:01     ` Lai Jiangshan
2012-09-06  9:01       ` Lai Jiangshan
2012-09-06 12:56       ` Michal Nazarewicz [this message]
2012-09-06 12:48 ` Michal Nazarewicz
2012-09-06 12:48   ` Michal Nazarewicz
2012-09-06 16:34 ` Bartlomiej Zolnierkiewicz
2012-09-06 16:34   ` Bartlomiej Zolnierkiewicz
2012-09-11  0:49   ` Minchan Kim
2012-09-11  0:49     ` Minchan Kim
2012-09-13 14:21   ` Bartlomiej Zolnierkiewicz
2012-09-13 14:21     ` Bartlomiej Zolnierkiewicz
2012-09-14  1:15     ` Minchan Kim
2012-09-14  1:15       ` Minchan Kim
2012-09-07  7:28 ` Wen Congyang
2012-09-07  7:28   ` Wen Congyang
2012-09-11  0:52   ` Minchan Kim
2012-09-11  0:52     ` Minchan Kim
2012-09-11  1:37     ` Wen Congyang
2012-09-11  1:37       ` Wen Congyang
2012-09-11  6:16       ` Minchan Kim
2012-09-11  6:16         ` 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=xa1tmx139unm.fsf@mina86.com \
    --to=mina86@mina86.com \
    --cc=akpm@linux-foundation.org \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=konrad.wilk@oracle.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan@kernel.org \
    --cc=wency@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.