linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Ingo Korb <ingo@akana.de>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org, mel@csn.ul.ie,
	cl@linux-foundation.org, yinghai@kernel.org,
	andi.kleen@intel.com, linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: __offline_isolated_pages may offline too many pages
Date: Wed, 15 Dec 2010 09:21:34 +0900	[thread overview]
Message-ID: <20101215092134.e2c8849f.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <4D0786D3.7070007@akana.de>

On Tue, 14 Dec 2010 16:01:39 +0100
Ingo Korb <ingo@akana.de> wrote:

> Hi!
> 
> [1.] One line summary of the problem:
> __offline_isolated_pages may isolate too many pages
> 
> [2.] Full description of the problem/report:
> While experimenting with remove_memory/online_pages, removing as few 
> pages as possible (pageblock_nr_pages, 512 on my box) I noticed that the 
> number of pages marked "reserved" increased even though both functions 
> did not indicate an error. Following the code it was clear that 
> __offline_isolated_pages marked twice as many pages as it should:
> 

It's designed for offline memory section > MAX_ORDER. pageblock_nr_pages
is tend to be smaller than that.

Do you see the problem with _exsisting_ user interface of memory hotplug ?
I think we have no control other than memory section.

> === start paste (from dmesg) ===
> Offlined Pages 512
> remove from free list c00 1024 e00
> === end paste ===
> 
> The issue seems to be that __offline_isolated_pages blindly uses 
> page_order() to determine how many pages it should mark as reserved in 
> the current loop iteration, without checking if this would exceed the 
> limit set by end_pfn.
> 

It's because designed to work under memory section, it's aligned to MAX_ORDER.
Its blindness works correctly.


> I'm not sure what the correct way to fix this would be - is memory 
> isolation supposed to touch the order of a page if it crosses the end 
> (or beginning!) of the range of pages to be isolated?
> 

Nothing to be fixed. If you _need_ another functionality, please add a new
feature. But, in theory, memory offline doesn't work in the range smaller
than MAX_ORDER because of buddy allocator.

Thanks,
-Kame

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-12-15  0:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14 15:01 Ingo Korb
2010-12-15  0:21 ` KAMEZAWA Hiroyuki [this message]
2010-12-15  9:25   ` Ingo Korb
2010-12-16  0:06     ` KAMEZAWA Hiroyuki
2010-12-16 10:26       ` Mel Gorman
2010-12-16 23:57         ` [PATCH] memory hotplug: fix alignment check (Was " KAMEZAWA Hiroyuki

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=20101215092134.e2c8849f.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi.kleen@intel.com \
    --cc=cl@linux-foundation.org \
    --cc=ingo@akana.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=yinghai@kernel.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