[patch 0/3] memory hotplug prototype
From: IWAMOTO Toshihiro
Date: Tue Apr 06 2004 - 05:55:20 EST
This is an updated version of memory hotplug prototype patch, which I
have posted here several times.
Main changes are:
* Changes to make hotpluggable normal zones possible:
* Added two fields (removable, enabled) to pglist_data.
* Added __GFP_HOTREMOVABLE macro for page caches and
anonymous pages.
* Added an element to node_zonelists[].
node_zonelists[3] is for __GFP_HOTREMOVABLE.
* node_zonelists[] are calculated using pgdat->removable and
pgdat->enabled. zone_active[] checks have been removed.
* Remap code has been cleaned up, to share code with hugepage
handling and better readability.
* Some hack to work better under high IO load. (incomplete)
* Changed page remapping rollback detection logic not to use
PG_again bit as suggested by Dave Hansen in
lhms-devel@sourceforge. PG_again is left for consistency
checks. (not tested well)
* Added an argument to remap_onepage() specifying a node to
allocate replacement pages. (NUMA support, incomplete)
/proc/memhotplug interface has been changed. For example:
# echo plug 1 > /proc/memhotplug
Plugs node 1.
# echo enable 1 > /proc/memhotplug
Enables page allocation from node 1.
# echo disable 1 > /proc/memhotplug
Disables page allocation from node 1.
# echo remap 5 > /proc/memhotplug
Free pages in zone 5 by remapping.
# echo unplug 1 > /proc/memhotplug
Unplugs node 1. (All pages must be freed in advance)
$ cat /proc/memhotplug
Node 0 enabled nonhotremovable
DMA[0]: free 250, active 940, present 4096
Normal[1]: free 307, active 101623, present 126976
Node 1 enabled hotremovable
Normal[5]: free 336, active 9287, present 83968
HighMem[6]: free 88, active 14406, present 45056
Known issues/TODO items:
* kswapd doesn't terminate when a node is unplugged.
* Currently, a page is written back to disk before remapping
if it has a dirty buffer. This can be too slow, so
such pages needs to be handled without issueing writebacks.
I guess this would require a new vfs interface.
My patch consists of 3 files:
1. memoryhotplug.patch
The main patch.
2. va-emulation_memhotplug.patch
to emulate hotpluggable memory blocks on usual PC.
3. va-proc_memhotplug.patch
/proc/memhotplug interface.
They are sent as followups to this mail and will be followed by
Takahashi's hugetlbfs page remapping patches shortly.
--
IWAMOTO Toshihiro
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/