From: Dave Hansen <haveblue@us.ibm.com>
To: Mike Kravetz <kravetz@us.ibm.com>
Cc: "Martin J. Bligh" <mbligh@aracnet.com>,
IWAMOTO Toshihiro <iwamoto@valinux.co.jp>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
lhms <lhms-devel@lists.sourceforge.net>
Subject: Re: [Lhms-devel] Re: [patch 0/3] memory hotplug prototype
Date: Wed, 07 Apr 2004 12:20:43 -0700 [thread overview]
Message-ID: <1081365642.19588.169.camel@nighthawk> (raw)
In-Reply-To: <20040407185953.GC4292@w-mikek2.beaverton.ibm.com>
On Wed, 2004-04-07 at 11:59, Mike Kravetz wrote:
> I've been thinking about how to take a section (or any 'block') of
> memory offline. To do this the offlining code needs to somehow
> 'allocate' all the pages associated with the section. After
> 'allocation', the code knows the pages are not 'in use' and safely
> offline. Any suggestions on how to approach this? I don't think
> we can add any infrastructure to section definitions as these will
> need to be relatively small. Do we need to teach some of the code
> paths that currently understand zones about sections?
No, we don't need to teach zones about sections, yet (we may never have
to). Zones currently know about contiguous pfn ranges.
CONFIG_NONLINEAR (CNL) allows arbirary mappings from virtual and
physical memory locations to pfns. Using this, we can keep zones
dealing with contiguous pfn ranges, and still back them with any random
memory that we want.
I think that the code changes that will be needed to offline sections
will be mostly limited to teaching the page allocator a few things about
allocating particular pfn (or physical) ranges. If you can alloc() a
certain set of memory, then it's free to offline.
offline_section(section) {
mark_section_going_offline(section)
pfn = section_to_pfn(section)
some_alloc_pages(SECTION_ORDER, pfn, ...)
if alloc is ok
mark_section_offline(section)
else
try smaller pieces
}
The mark_section_going_offline() will be used by the __free_pages() path
to intercept any page that's going offline from getting freed back into
the page allocator. After being intercepted like this, the page can
then be considered "allocated" for the removal process.
I think the mark_section_going_offline() stage is what some others have
referred to as a "caged" state before memory is offlined.
-- Dave
next prev parent reply other threads:[~2004-04-07 19:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-06 10:53 [patch 0/3] memory hotplug prototype IWAMOTO Toshihiro
2004-04-06 10:56 ` [patch 1/3] " IWAMOTO Toshihiro
2004-04-06 17:12 ` Dave Hansen
2004-04-07 6:10 ` IWAMOTO Toshihiro
2004-04-06 10:58 ` [patch 2/3] " IWAMOTO Toshihiro
2004-04-06 10:59 ` [patch 3/3] " IWAMOTO Toshihiro
2004-04-06 11:47 ` [patch 0/3] " IWAMOTO Toshihiro
2004-04-06 12:41 ` [patch 0/6] memory hotplug for hugetlbpages Hirokazu Takahashi
2004-04-06 12:44 ` [patch 1/6] " Hirokazu Takahashi
2004-04-06 12:45 ` [patch 2/6] " Hirokazu Takahashi
2004-04-06 12:45 ` [patch 3/6] " Hirokazu Takahashi
2004-04-06 12:48 ` [Lhms-devel] [patch 4/6] " Hirokazu Takahashi
2004-04-06 13:02 ` Russell King
2004-04-06 13:11 ` Hirokazu Takahashi
2004-04-06 12:49 ` [patch 5/6] " Hirokazu Takahashi
2004-04-06 12:50 ` [patch 6/6] " Hirokazu Takahashi
2004-04-07 18:12 ` [patch 0/3] memory hotplug prototype Martin J. Bligh
2004-04-07 18:59 ` [Lhms-devel] " Mike Kravetz
2004-04-07 19:20 ` Dave Hansen [this message]
2004-04-07 22:33 ` Martin J. Bligh
2004-04-08 12:41 ` Hirokazu Takahashi
2004-04-08 9:16 ` IWAMOTO Toshihiro
2004-04-08 10:19 ` [Lhms-devel] " IWAMOTO Toshihiro
2004-04-08 12:10 ` Hirokazu Takahashi
2004-04-08 16:56 ` Martin J. Bligh
2004-04-09 2:37 ` IWAMOTO Toshihiro
2004-04-09 5:18 ` Martin J. Bligh
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=1081365642.19588.169.camel@nighthawk \
--to=haveblue@us.ibm.com \
--cc=iwamoto@valinux.co.jp \
--cc=kravetz@us.ibm.com \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.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