<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/mm/memblock.c, branch v3.19-rc4</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.19-rc4</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.19-rc4'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2014-12-13T20:42:46+00:00</updated>
<entry>
<title>mm/memblock.c: refactor functions to set/clear MEMBLOCK_HOTPLUG</title>
<updated>2014-12-13T20:42:46+00:00</updated>
<author>
<name>Tony Luck</name>
<email>tony.luck@intel.com</email>
</author>
<published>2014-12-13T00:54:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4308ce17f6e1c404276484f6e4e0bf496a95982f'/>
<id>urn:sha1:4308ce17f6e1c404276484f6e4e0bf496a95982f</id>
<content type='text'>
There is a lot of duplication in the rubric around actually setting or
clearing a mem region flag.  Create a new helper function to do this and
reduce each of memblock_mark_hotplug() and memblock_clear_hotplug() to a
single line.

This will be useful if someone were to add a new mem region flag - which
I hope to be doing some day soon. But it looks like a plausible cleanup
even without that - so I'd like to get it out of the way now.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Santosh Shilimkar &lt;santosh.shilimkar@ti.com&gt;
Cc: Tang Chen &lt;tangchen@cn.fujitsu.com&gt;
Cc: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Cc: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Cc: Philipp Hachtmann &lt;phacht@linux.vnet.ibm.com&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Emil Medve &lt;Emilian.Medve@freescale.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mem-hotplug: let memblock skip the hotpluggable memory regions in __next_mem_range()</title>
<updated>2014-09-10T22:42:12+00:00</updated>
<author>
<name>Xishi Qiu</name>
<email>qiuxishi@huawei.com</email>
</author>
<published>2014-09-09T21:50:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0a313a998adbae19c1309f80a3ad79107fff7c4e'/>
<id>urn:sha1:0a313a998adbae19c1309f80a3ad79107fff7c4e</id>
<content type='text'>
Let memblock skip the hotpluggable memory regions in __next_mem_range(),
it is used to to prevent memblock from allocating hotpluggable memory
for the kernel at early time. The code is the same as __next_mem_range_rev().

Clear hotpluggable flag before releasing free pages to the buddy
allocator.  If we don't clear hotpluggable flag in
free_low_memory_core_early(), the memory which marked hotpluggable flag
will not free to buddy allocator.  Because __next_mem_range() will skip
them.

free_low_memory_core_early
	for_each_free_mem_range
		for_each_mem_range
			__next_mem_range

[akpm@linux-foundation.org: fix warning]
Signed-off-by: Xishi Qiu &lt;qiuxishi@huawei.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Tang Chen &lt;tangchen@cn.fujitsu.com&gt;
Cc: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Cc: Wen Congyang &lt;wency@cn.fujitsu.com&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>memblock, memhotplug: fix wrong type in memblock_find_in_range_node().</title>
<updated>2014-08-29T23:28:15+00:00</updated>
<author>
<name>Tang Chen</name>
<email>tangchen@cn.fujitsu.com</email>
</author>
<published>2014-08-29T22:18:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0cfb8f0c3e21e36d4a6e472e4c419d58ba848698'/>
<id>urn:sha1:0cfb8f0c3e21e36d4a6e472e4c419d58ba848698</id>
<content type='text'>
In memblock_find_in_range_node(), we defined ret as int.  But it should
be phys_addr_t because it is used to store the return value from
__memblock_find_range_bottom_up().

The bug has not been triggered because when allocating low memory near
the kernel end, the "int ret" won't turn out to be negative.  When we
started to allocate memory on other nodes, and the "int ret" could be
minus.  Then the kernel will panic.

A simple way to reproduce this: comment out the following code in
numa_init(),

        memblock_set_bottom_up(false);

and the kernel won't boot.

Reported-by: Xishi Qiu &lt;qiuxishi@huawei.com&gt;
Signed-off-by: Tang Chen &lt;tangchen@cn.fujitsu.com&gt;
Tested-by: Xishi Qiu &lt;qiuxishi@huawei.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[3.13+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/memblock.c: call kmemleak directly from memblock_(alloc|free)</title>
<updated>2014-06-06T23:08:17+00:00</updated>
<author>
<name>Catalin Marinas</name>
<email>catalin.marinas@arm.com</email>
</author>
<published>2014-06-06T21:38:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=aedf95ea0583676cd7bfa395681ad744791a433e'/>
<id>urn:sha1:aedf95ea0583676cd7bfa395681ad744791a433e</id>
<content type='text'>
Kmemleak could ignore memory blocks allocated via memblock_alloc()
leading to false positives during scanning.  This patch adds the
corresponding callbacks and removes kmemleak_free_* calls in
mm/nobootmem.c to avoid duplication.

The kmemleak_alloc() in mm/nobootmem.c is kept since
__alloc_memory_core_early() does not use memblock_alloc() directly.

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/memblock.c: use PFN_DOWN</title>
<updated>2014-06-04T23:54:02+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-06-04T23:07:51+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f7e2f7e896d8b74e92b687f7333721fd7be0f4b5'/>
<id>urn:sha1:f7e2f7e896d8b74e92b687f7333721fd7be0f4b5</id>
<content type='text'>
Replace ((x) &gt;&gt; PAGE_SHIFT) with the pfn macro.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>memblock: introduce memblock_alloc_range()</title>
<updated>2014-06-04T23:53:57+00:00</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2014-06-04T23:06:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2bfc2862c4fe38379a2fb2cfba33fad32ccb4ff4'/>
<id>urn:sha1:2bfc2862c4fe38379a2fb2cfba33fad32ccb4ff4</id>
<content type='text'>
This introduces memblock_alloc_range() which allocates memblock from the
specified range of physical address.  I would like to use this function
to specify the location of CMA.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Don Dutile &lt;ddutile@redhat.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/memblock: add physical memory list</title>
<updated>2014-05-20T06:58:39+00:00</updated>
<author>
<name>Philipp Hachtmann</name>
<email>phacht@linux.vnet.ibm.com</email>
</author>
<published>2014-01-29T17:16:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=70210ed950b538ee7eb811dccc402db9df1c9be4'/>
<id>urn:sha1:70210ed950b538ee7eb811dccc402db9df1c9be4</id>
<content type='text'>
Add the physmem list to the memblock structure. This list only exists
if HAVE_MEMBLOCK_PHYS_MAP is selected and contains the unmodified
list of physically available memory. It differs from the memblock
memory list as it always contains all memory ranges even if the
memory has been restricted, e.g. by use of the mem= kernel parameter.

Signed-off-by: Philipp Hachtmann &lt;phacht@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>mm/memblock: Do some refactoring, enhance API</title>
<updated>2014-05-20T06:58:39+00:00</updated>
<author>
<name>Philipp Hachtmann</name>
<email>phacht@linux.vnet.ibm.com</email>
</author>
<published>2014-01-29T17:16:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f1af9d3af308145478749194346f11efad1134b2'/>
<id>urn:sha1:f1af9d3af308145478749194346f11efad1134b2</id>
<content type='text'>
Refactor the memblock code and extend the memblock API to make it
more flexible. With the extended API it is simple to define and
work with additional memory lists.

The static functions memblock_add_region and __memblock_remove are
renamed to memblock_add_range and meblock_remove_range and added to
the memblock API.

The __next_free_mem_range and __next_free_mem_range_rev functions
are replaced with calls to the more generic list walkers
__next_mem_range and __next_mem_range_rev.

To walk an arbitrary memory list two new macros for_each_mem_range
and for_each_mem_range_rev are added. These new macros are used
to define for_each_free_mem_range and for_each_free_mem_range_reverse.

Signed-off-by: Philipp Hachtmann &lt;phacht@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>mm/memblock.c: use PFN_PHYS()</title>
<updated>2014-04-07T23:35:58+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-04-07T22:37:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=167632303005670713603452a3c9ee5de4aa5828'/>
<id>urn:sha1:167632303005670713603452a3c9ee5de4aa5828</id>
<content type='text'>
Replace ((phys_addr_t)(x) &lt;&lt; PAGE_SHIFT) by pfn macro.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>memblock: use for_each_memblock()</title>
<updated>2014-04-07T23:35:58+00:00</updated>
<author>
<name>Emil Medve</name>
<email>Emilian.Medve@freescale.com</email>
</author>
<published>2014-04-07T22:37:52+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=136199f0a67cd6bb3f0e8de0ad50f52879f82077'/>
<id>urn:sha1:136199f0a67cd6bb3f0e8de0ad50f52879f82077</id>
<content type='text'>
This is a small cleanup.

Signed-off-by: Emil Medve &lt;Emilian.Medve@Freescale.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
