Skip to contentSkip to conversation

Fix calculation of grow_pgdat_span() in mm/memory_hotplug.c

PATCH In review Yasunori Goto 2 participants 2 messages Dec 13, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix calculation of grow_pgdat_span() in mm/memory_hotplug.c

Dave-san.
CC: Andrew-san.

I realized 2.6.15-rc5 still has a bug for memory hotplug. The calculation for node_spanned_pages at grow_pgdat_span() is clearly wrong. This is patch for it.

(Please see grow_zone_span() to compare. It is correct.)

Thanks.

mm/memory_hotplug.c +1 -1
Index: zone_reclaim/mm/memory_hotplug.c
===================================================================
@@ -104,7 +104,7 @@ static void grow_pgdat_span(struct pglis
 		pgdat->node_start_pfn = start_pfn;
 
 	if (end_pfn > old_pgdat_end_pfn)
-		pgdat->node_spanned_pages = end_pfn - pgdat->node_spanned_pages;
+		pgdat->node_spanned_pages = end_pfn - pgdat->node_start_pfn;
 }
 
 int online_pages(unsigned long pfn, unsigned long nr_pages)
Signature · 8 lines
Yasunori Goto 


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#1 lore raw
Quoted 6 lines · Yasunori Goto

Dave-san.
CC: Andrew-san.

I realized 2.6.15-rc5 still has a bug for memory hotplug. The calculation for node_spanned_pages at grow_pgdat_span() is clearly wrong. This is patch for it.

Clearly wrong is the term for it. Thanks for the fix.

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>