<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/mm/bootmem.c, branch v2.6.25</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>mm: fix boundary checking in free_bootmem_core</title>
<updated>2008-03-25T02:22:19+00:00</updated>
<author>
<name>Yinghai Lu</name>
<email>yhlu.kernel@gmail.com</email>
</author>
<published>2008-03-24T19:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5a982cbc7b3fe6cf72266f319286f29963c71b9e'/>
<id>5a982cbc7b3fe6cf72266f319286f29963c71b9e</id>
<content type='text'>
With numa enabled, some callers could have a range of memory on one node
but try to free that on other node.  This can cause some pages to be
freed wrongly.

For example: when we try to allocate 128g boot ram early for
gart/swiotlb, and free that range later so gart/swiotlb can get some
range afterwards.

With this patch, we don't need to care which node holds the range, just
loop to call free_bootmem_node for all online nodes.

This patch makes free_bootmem_core() more robust by trimming the sidx
and eidx according the ram range that the node has.

And make the free_bootmem_core handle this out of range case.  We could
use bdata_list to make sure the range can be freed for sure.  So next
time, we don't need to loop online nodes and could use free_bootmem
directly.

Signed-off-by: Yinghai Lu &lt;yhlu.kernel@gmail.com&gt;
Cc: Andi Kleen &lt;ak@suse.de&gt;
Cc: Yasunori Goto &lt;y-goto@jp.fujitsu.com&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Tested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Christoph Lameter &lt;clameter@sgi.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With numa enabled, some callers could have a range of memory on one node
but try to free that on other node.  This can cause some pages to be
freed wrongly.

For example: when we try to allocate 128g boot ram early for
gart/swiotlb, and free that range later so gart/swiotlb can get some
range afterwards.

With this patch, we don't need to care which node holds the range, just
loop to call free_bootmem_node for all online nodes.

This patch makes free_bootmem_core() more robust by trimming the sidx
and eidx according the ram range that the node has.

And make the free_bootmem_core handle this out of range case.  We could
use bdata_list to make sure the range can be freed for sure.  So next
time, we don't need to loop online nodes and could use free_bootmem
directly.

Signed-off-by: Yinghai Lu &lt;yhlu.kernel@gmail.com&gt;
Cc: Andi Kleen &lt;ak@suse.de&gt;
Cc: Yasunori Goto &lt;y-goto@jp.fujitsu.com&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Tested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Christoph Lameter &lt;clameter@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce flags for reserve_bootmem()</title>
<updated>2008-02-07T16:42:25+00:00</updated>
<author>
<name>Bernhard Walle</name>
<email>bwalle@suse.de</email>
</author>
<published>2008-02-07T08:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=72a7fe3967dbf86cb34e24fbf1d957fe24d2f246'/>
<id>72a7fe3967dbf86cb34e24fbf1d957fe24d2f246</id>
<content type='text'>
This patchset adds a flags variable to reserve_bootmem() and uses the
BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions
between crashkernel area and already used memory.

This patch:

Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE.
If that flag is set, the function returns with -EBUSY if the memory already
has been reserved in the past.  This is to avoid conflicts.

Because that code runs before SMP initialisation, there's no race condition
inside reserve_bootmem_core().

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix powerpc build]
Signed-off-by: Bernhard Walle &lt;bwalle@suse.de&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Vivek Goyal &lt;vgoyal@in.ibm.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patchset adds a flags variable to reserve_bootmem() and uses the
BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions
between crashkernel area and already used memory.

This patch:

Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE.
If that flag is set, the function returns with -EBUSY if the memory already
has been reserved in the past.  This is to avoid conflicts.

Because that code runs before SMP initialisation, there's no race condition
inside reserve_bootmem_core().

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix powerpc build]
Signed-off-by: Bernhard Walle &lt;bwalle@suse.de&gt;
Cc: &lt;linux-arch@vger.kernel.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Vivek Goyal &lt;vgoyal@in.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] remove EXPORT_UNUSED_SYMBOL'ed symbols</title>
<updated>2006-12-07T16:39:44+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@stusta.de</email>
</author>
<published>2006-12-07T04:40:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=045f147f3290395661b56b9231fc4d221e150963'/>
<id>045f147f3290395661b56b9231fc4d221e150963</id>
<content type='text'>
In time for 2.6.20, we can get rid of this junk.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In time for 2.6.20, we can get rid of this junk.

Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] enable booting a NUMA system where some nodes have no memory</title>
<updated>2006-12-07T16:39:22+00:00</updated>
<author>
<name>Christian Krafft</name>
<email>krafft@de.ibm.com</email>
</author>
<published>2006-12-07T04:32:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7c309a64d6afa90a0a07813c836ba480aeaeca8c'/>
<id>7c309a64d6afa90a0a07813c836ba480aeaeca8c</id>
<content type='text'>
When booting a NUMA system with nodes that have no memory (eg by limiting
memory), bootmem_alloc_core tried to find pages in an uninitialized
bootmem_map.  This caused a null pointer access.  This fix adds a check, so
that NULL is returned.  That will enable the caller (bootmem_alloc_nopanic)
to alloc memory on other without a panic.

Signed-off-by: Christian Krafft &lt;krafft@de.ibm.com&gt;
Cc: Christoph Lameter &lt;clameter@engr.sgi.com&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.org&gt;
Cc: Martin Bligh &lt;mbligh@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When booting a NUMA system with nodes that have no memory (eg by limiting
memory), bootmem_alloc_core tried to find pages in an uninitialized
bootmem_map.  This caused a null pointer access.  This fix adds a check, so
that NULL is returned.  That will enable the caller (bootmem_alloc_nopanic)
to alloc memory on other without a panic.

Signed-off-by: Christian Krafft &lt;krafft@de.ibm.com&gt;
Cc: Christoph Lameter &lt;clameter@engr.sgi.com&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.org&gt;
Cc: Martin Bligh &lt;mbligh@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] bootmem: use MAX_DMA_ADDRESS instead of LOW32LIMIT</title>
<updated>2006-09-26T15:48:49+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2006-09-26T06:31:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=dfd54cbcc0b834652389ce99b5e656ea5f44a3c1'/>
<id>dfd54cbcc0b834652389ce99b5e656ea5f44a3c1</id>
<content type='text'>
Introduce ARCH_LOW_ADDRESS_LIMIT which can be set per architecture to
override the 4GB default limit used by the bootmem allocater within
__alloc_bootmem_low() and __alloc_bootmem_low_node().  E.g.  s390 needs a
2GB limit instead of 4GB.

Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce ARCH_LOW_ADDRESS_LIMIT which can be set per architecture to
override the 4GB default limit used by the bootmem allocater within
__alloc_bootmem_low() and __alloc_bootmem_low_node().  E.g.  s390 needs a
2GB limit instead of 4GB.

Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] bootmem: miscellaneous coding style fixes</title>
<updated>2006-09-26T15:48:45+00:00</updated>
<author>
<name>Franck Bui-Huu</name>
<email>vagabon.xyz@gmail.com</email>
</author>
<published>2006-09-26T06:31:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f71bf0cac730ccb5ebcdf21747db75ae0445ccde'/>
<id>f71bf0cac730ccb5ebcdf21747db75ae0445ccde</id>
<content type='text'>
It fixes various coding style issues, specially when spaces are useless.  For
example '*' go next to the function name.

Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It fixes various coding style issues, specially when spaces are useless.  For
example '*' go next to the function name.

Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] bootmem: use pfn/page conversion macros</title>
<updated>2006-09-26T15:48:45+00:00</updated>
<author>
<name>Franck Bui-Huu</name>
<email>vagabon.xyz@gmail.com</email>
</author>
<published>2006-09-26T06:31:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bbc7b92e337ac349ca917f9bf0b6be4743c14f3a'/>
<id>bbc7b92e337ac349ca917f9bf0b6be4743c14f3a</id>
<content type='text'>
It also creates get_mapsize() helper in order to make the code more readable
when it calculates the boot bitmap size.

Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It also creates get_mapsize() helper in order to make the code more readable
when it calculates the boot bitmap size.

Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] bootmem: remove useless headers inclusions</title>
<updated>2006-09-26T15:48:45+00:00</updated>
<author>
<name>Franck Bui-Huu</name>
<email>vagabon.xyz@gmail.com</email>
</author>
<published>2006-09-26T06:31:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e786e86a542ccc1133f333402526ad00b9c088ae'/>
<id>e786e86a542ccc1133f333402526ad00b9c088ae</id>
<content type='text'>
Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] bootmem: limit to 80 columns width</title>
<updated>2006-09-26T15:48:45+00:00</updated>
<author>
<name>Franck Bui-Huu</name>
<email>vagabon.xyz@gmail.com</email>
</author>
<published>2006-09-26T06:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bb0923a66820718f636736b22ce47372f79e3400'/>
<id>bb0923a66820718f636736b22ce47372f79e3400</id>
<content type='text'>
Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] bootmem: mark link_bootmem() as part of the __init section</title>
<updated>2006-09-26T15:48:45+00:00</updated>
<author>
<name>Franck Bui-Huu</name>
<email>vagabon.xyz@gmail.com</email>
</author>
<published>2006-09-26T06:31:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=69d49e681d7c7ed864a1ba45efc1e78433df8b9a'/>
<id>69d49e681d7c7ed864a1ba45efc1e78433df8b9a</id>
<content type='text'>
Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
