Thread (83 messages) 83 messages, 9 authors, 2013-08-19

Re: [PATCH part5 5/7] memblock, mem_hotplug: Make memblock skip hotpluggable regions by default.

From: Tang Chen <hidden>
Date: 2013-08-15 05:17:39
Also in: linux-acpi, lkml

On 08/15/2013 05:54 AM, Naoya Horiguchi wrote:
On Thu, Aug 08, 2013 at 06:16:17PM +0800, Tang Chen wrote:
quoted
--- a/mm/memblock.c
+++ b/mm/memblock.c
...
quoted
@@ -719,6 +723,10 @@ void __init_memblock __next_free_mem_range_rev(u64 *idx, int nid,
  		if (nid != MAX_NUMNODES&&  nid != memblock_get_region_node(m))
  			continue;

+		/* skip hotpluggable memory regions */
+		if (m->flags&  MEMBLOCK_HOTPLUG)
+			continue;
+
  		/* scan areas before each reservation for intersection */
  		for ( ; ri>= 0; ri--) {
  			struct memblock_region *r =&rsv->regions[ri];
-- 
Why don't you add this also in __next_free_mem_range()?
Hi Naoya,

__next_free_mem_range_rev() is for for_each_free_mem_range_reverse(),
which is
only called in memblock_find_in_range_node().

But I think __next_free_mem_range() is for for_each_free_mem_range,
which is
called by many others. These callers could has nothing to do with memory
hotplug.
So I didn't add.

Maybe adding the check here is not good. I'm trying to find somewhere to
check MEMBLOCK_HOTPLUG.

Thanks. :)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help