linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* start_isolate_page_range() question/offline_pages() bug ?
@ 2007-11-01 19:19 Badari Pulavarty
  2007-11-02  4:44 ` KAMEZAWA Hiroyuki
  2007-11-02  7:58 ` KAMEZAWA Hiroyuki
  0 siblings, 2 replies; 4+ messages in thread
From: Badari Pulavarty @ 2007-11-01 19:19 UTC (permalink / raw)
  To: KAMEZAWA Hiroyuki; +Cc: linux-mm

Hi KAME,

While testing hotplug memory remove on x86_64, found an issue.

offline_pages()
{

	...
	
	/* set above range as isolated */
        ret = start_isolate_page_range(start_pfn, end_pfn);
	

	... does all the work and successful ...

        /* reset pagetype flags */
        start_isolate_page_range(start_pfn, end_pfn);
        /* removal success */
}

As you can see it calls, start_isolate_page_range() again at
the end. Why ? I am assuming that, to clear MIGRATE_ISOLATE
type for those pages we marked earlier. Isn't it ? But its
wrong. The pages are already set MIGRATE_ISOLATE and it
will end up clearing ONLY the first page in the pageblock.
Shouldn't we clear MIGRATE_ISOLATE for all the pages ?

I see this issue on x86-64, because /sysfs memory block
is 128MB, but pageblock_nr_pages = 512 (2MB).

I can reproduce the problem easily.. by doing ..

echo offline > state
echo online > state
echo offline > state <--- this one will fail
echo offline > state <-- fail
echo offline > state <-- fail

Everytime we do "offline" it clears first page in 2MB
section as part of undo :(

Here is the debug:
	
memory offlining 58000 to 60000 started
Offlined Pages 32768

memory offlining 58000 to 60000 started
isolate failed for pfn 58200 migratetype 4

memory offlining 58000 to 60000 started
isolate failed for pfn 58400 migratetype 4

memory offlining 58000 to 60000 started
isolate failed for pfn 58600 migratetype 4

memory offlining 58000 to 60000 started
isolate failed for pfn 58800 migratetype 4


Thanks,
Badari

--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-02 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-01 19:19 start_isolate_page_range() question/offline_pages() bug ? Badari Pulavarty
2007-11-02  4:44 ` KAMEZAWA Hiroyuki
2007-11-02  7:58 ` KAMEZAWA Hiroyuki
2007-11-02 16:06   ` Badari Pulavarty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox