linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/3] memory hotplug prototype
@ 2004-04-06 10:53 IWAMOTO Toshihiro
  2004-04-06 10:56 ` [patch 1/3] " IWAMOTO Toshihiro
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: IWAMOTO Toshihiro @ 2004-04-06 10:53 UTC (permalink / raw)
  To: linux-kernel, lhms-devel

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

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2004-04-09  5:18 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).