question on page-migration code

Ray Bryant
2005-04-07T22:16:30Z

Hirokazu (and Marcelo),

In testing my manual page migration code, I've run up against a situation
where the migrations are occasionally very slow. They work ok, but they
can take minutes to migrate a few megabytes of memory.

Dropping into kdb shows that the migration code is waiting in msleep() in
migrate_page_common() due to an -EAGAIN return from page_migratable().
A little further digging shows that the specific return in page_migratable()
is the very last one there at the bottom of the routine.

I'm puzzled as to why the page is still busy in this case. Previous code
in page_migratable() has unmapped the page, its not in PageWriteback()
because we would have taken a different return statement in that case.

According to /proc/meminfo, there are no pages in either SwapCache or
Dirty state, and the system has been sync'd before the migrate_pages()
call was issued.
--
Best Regards,
Ray