Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator framework

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: KAMEZAWA Hiroyuki
Date: Wednesday, August 25, 2010 - 5:58 pm

On Wed, 25 Aug 2010 15:58:14 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:


Hmm, you may not like this..but how about following kind of interface ?

Now, memoyr hotplug supports following operation to free and _isolate_
memory region.
	# echo offline > /sys/devices/system/memory/memoryX/state

Then, a region of memory will be isolated. (This succeeds if there are free
memory.)

Add a new interface.

	% echo offline > /sys/devices/system/memory/memoryX/state
	# extract memory from System RAM and make them invisible from buddy allocator.

	% echo cma > /sys/devices/system/memory/memoryX/state
	# move invisible memory to cma.

Then, a chunk of memory will be moved into contiguous-memory-allocator.

To move "cma" region as usual region,
	# echo offline > /sys/devices/system/memory/memoryX/state
	# echo online > /sys/devices/system/memory/memoryX/state

Maybe "used-for-cma" memory are can be populated via /proc/iomem
As,
	100000000-63fffffff : System RAM
	640000000-800000000 : Contiguous RAM (Used for drivers)
(And you have to skip small memory holes by seeing this file)

Of course, cma guys can keep continue to use their own boot option.
With memory hotplug, kernelcore=xxxM interface can be used for creating
ZONE_MOVABLE. Some complicated work may be needed as

	# echo movable > /sys/devices/system/memory/memoryX/state
	(online pages and move them into ZONE_MOVABLE)

If anyone interested in, I may be able to offer some help.

Thanks,
-Kame










--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH/RFCv4 0/6] The Contiguous Memory Allocator framework, Michal Nazarewicz, (Fri Aug 20, 2:50 am)
[PATCH/RFCv4 1/6] lib: rbtree: rb_root_init() function added, Michal Nazarewicz, (Fri Aug 20, 2:50 am)
[PATCH/RFCv4 2/6] mm: cma: Contiguous Memory Allocator added, Michal Nazarewicz, (Fri Aug 20, 2:50 am)
[PATCH/RFCv4 3/6] mm: cma: Added SysFS support, Michal Nazarewicz, (Fri Aug 20, 2:50 am)
[PATCH/RFCv4 4/6] mm: cma: Added command line parameters s ..., Michal Nazarewicz, (Fri Aug 20, 2:50 am)
[PATCH/RFCv4 5/6] mm: cma: Test device and application added, Michal Nazarewicz, (Fri Aug 20, 2:50 am)
[PATCH/RFCv4 6/6] arm: Added CMA to Aquila and Goni, Michal Nazarewicz, (Fri Aug 20, 2:50 am)
Re: [PATCH/RFCv4 2/6] mm: cma: Contiguous Memory Allocator ..., Konrad Rzeszutek Wilk, (Wed Aug 25, 1:32 pm)
Re: [PATCH/RFCv4 3/6] mm: cma: Added SysFS support, Konrad Rzeszutek Wilk, (Wed Aug 25, 1:37 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., KAMEZAWA Hiroyuki, (Wed Aug 25, 5:58 pm)
Re: [PATCH/RFCv4 3/6] mm: cma: Added SysFS support, Michał Nazarewicz, (Wed Aug 25, 6:20 pm)
Re: [PATCH/RFCv4 2/6] mm: cma: Contiguous Memory Allocator ..., Michał Nazarewicz, (Wed Aug 25, 6:22 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., Michał Nazarewicz, (Wed Aug 25, 6:28 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., Michał Nazarewicz, (Wed Aug 25, 6:38 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., Michał Nazarewicz, (Wed Aug 25, 6:49 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., Michał Nazarewicz, (Wed Aug 25, 7:12 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., Michał Nazarewicz, (Wed Aug 25, 7:40 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., KAMEZAWA Hiroyuki, (Wed Aug 25, 7:50 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., KAMEZAWA Hiroyuki, (Wed Aug 25, 8:44 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., Michał Nazarewicz, (Wed Aug 25, 9:01 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., KAMEZAWA Hiroyuki, (Wed Aug 25, 9:30 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., KAMEZAWA Hiroyuki, (Wed Aug 25, 9:39 pm)
[PATCH/RFCv4.1 2/6] mm: cma: Contiguous Memory Allocator added, Michal Nazarewicz, (Wed Aug 25, 11:25 pm)
Re: [PATCH/RFCv4 2/6] mm: cma: Contiguous Memory Allocator ..., Michał Nazarewicz, (Thu Aug 26, 7:09 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., Michał Nazarewicz, (Thu Aug 26, 7:41 pm)
Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator fram ..., KAMEZAWA Hiroyuki, (Fri Aug 27, 1:16 am)
Re: [PATCH/RFCv4 2/6] mm: cma: Contiguous Memory Allocator ..., Michał Nazarewicz, (Sat Aug 28, 6:48 pm)