Hmmm... But, in failure case, is it safe to call putback_lru_page() for them?
And, PageIsolated() would be left. Is it okay? It's not symmetric that
isolated page can be freed by decreasing ref count without calling
putback function. This should be clarified and documented.



I agree Joonsoo's idea.

Freeing isolated page out of putback() could be confused.

Every detail cannot be documented. And more documents mean less elegant code.

Is it possible to free isolated page in putback()?


In move_to_new_page(), can we call a_ops->migratepage like following?


move_to_new_page()

{

mapping = page_mapping(page)

if (!mapping)

    rc = migrate_page

else if (mapping->a_ops->migratepage && IsolatePage(page))

   rc = mapping->a_ops->migratepage

else

    rc = fallback_migrate_page

...

   return rc

}


I'm sorry that I couldn't review in detail because I forgot many details.




_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to