Re: [RFC] some page can't be migrated

From: Christoph Lameter
Date: Thu Jan 24 2008 - 22:37:29 EST


On Wed, 23 Jan 2008, Shaohua Li wrote:

> +
> + /*
> + * See truncate_complete_page(). Anonymous page might have
> + * fs-private metadata, the page is truncated. Such page can't be
> + * migrated. Try to free metadata, so the page can be freed.
> + */

Well maybe you should change the comment to refer to an orphaned page.
That is what Nick used. Also change the comment in truncate_complete_page.
Anonymous page is confusing here because you check that it is *not* an
anonymous page.

> + if (!page->mapping && !PageAnon(page) && PagePrivate(page)) {
> + try_to_release_page(page, GFP_KERNEL);
> + goto unlock;
> + }
> +


Could you move that into the corner case handling that follows?

So it would be something like

if (!page->mapping) {
if (!PageAnon(page) && PagePrivate(page))
try_to_relase_page(page, GFP_KERNEL);
goto rcu_unlock;
}

?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/