kernel-ark/arch
Jeff Dike 02dea0875b [PATCH] UML: Hotplug memory, take 2
Changes since first version
	added check for MADV_REMOVE support on the host
	fixed error return botch
	shrunk sprintf array by one character

This adds hotplug memory support to UML.  The mconsole syntax is
 	config mem=[+-]n[KMG]
In other words, add or subtract some number of kilobytes, megabytes, or
gigabytes.

Unplugged pages are allocated and then madvise(MADV_TRUNCATE), which is a
currently experimental madvise extension.  These pages are tracked so they
can be plugged back in later if the admin decides to give them back.  The
first page to be unplugged is used to keep track of about 4M of other
pages.  A list_head is the first thing on this page.  The rest is filled
with addresses of other unplugged pages.  This first page is not madvised,
obviously.

When this page is filled, the next page is used in a similar way and linked
onto a list with the first page.  Etc.  This whole process reverses when
pages are plugged back in.  When a tracking page no longer tracks any
unplugged pages, then it is next in line for plugging, which is done by
freeing pages back to the kernel.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-31 12:18:50 -08:00
..
alpha [PATCH] RTC: Remove RTC UIP synchronization on Alpha 2006-03-28 09:16:01 -08:00
arm Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-03-28 13:53:03 -08:00
arm26 [PATCH] unify PFN_* macros 2006-03-27 08:44:48 -08:00
cris [PATCH] unify PFN_* macros 2006-03-27 08:44:48 -08:00
frv [PATCH] bitops: frv: use generic bitops 2006-03-26 08:57:12 -08:00
h8300 [PATCH] bitops: h8300: use generic bitops 2006-03-26 08:57:12 -08:00
i386 [PATCH] i386 kdump timer vector lockup fix 2006-03-31 12:18:50 -08:00
ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-03-30 12:38:18 -08:00
m32r [PATCH] unify PFN_* macros 2006-03-27 08:44:48 -08:00
m68k [PATCH] RTC: Remove some duplicate BCD definitions 2006-03-28 09:16:01 -08:00
m68knommu [PATCH] bitops: m68knommu: use generic bitops 2006-03-26 08:57:13 -08:00
mips [PATCH] remove add_parent()'s parent argument 2006-03-28 18:36:41 -08:00
parisc [PARISC] Enabled some NLS modules in a500, b180 and c3000 defconfigs 2006-03-30 17:48:58 +00:00
powerpc [PATCH] powerpc: Remove oprofile spinlock backtrace code 2006-03-29 13:44:16 +11:00
ppc [PATCH] for_each_possible_cpu: ppc 2006-03-29 13:44:16 +11:00
s390 [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
sh [PATCH] for_each_possible_cpu: sh 2006-03-31 12:18:50 -08:00
sh64 [PATCH] RTC: Remove some duplicate BCD definitions 2006-03-28 09:16:01 -08:00
sparc [PATCH] bitops: sparc: use generic bitops 2006-03-26 08:57:14 -08:00
sparc64 [PATCH] RTC: Remove RTC UIP synchronization on Sparc64 2006-03-28 09:16:00 -08:00
um [PATCH] UML: Hotplug memory, take 2 2006-03-31 12:18:50 -08:00
v850 [PATCH] bitops: v850: use generic bitops 2006-03-26 08:57:14 -08:00
x86_64 [PATCH] RTC: Remove RTC UIP synchronization on x86_64 2006-03-28 09:16:00 -08:00
xtensa [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00