Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263747AbUDFKyB (ORCPT ); Tue, 6 Apr 2004 06:54:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263757AbUDFKyB (ORCPT ); Tue, 6 Apr 2004 06:54:01 -0400 Received: from sv1.valinux.co.jp ([210.128.90.2]:23721 "EHLO sv1.valinux.co.jp") by vger.kernel.org with ESMTP id S263747AbUDFKxz (ORCPT ); Tue, 6 Apr 2004 06:53:55 -0400 Date: Tue, 06 Apr 2004 19:53:53 +0900 From: IWAMOTO Toshihiro To: linux-kernel@vger.kernel.org, lhms-devel@lists.sourceforge.net Subject: [patch 0/3] memory hotplug prototype User-Agent: Wanderlust/2.8.1 (Something) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Message-Id: <20040406105353.9BDE8705DE@sv1.valinux.co.jp> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2705 Lines: 82 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/