Re: [PATCH 1/5] Swap Migration V5: LRU operations

From: Magnus Damm
Date: Mon Nov 07 2005 - 02:35:16 EST


On 11/1/05, Christoph Lameter <clameter@xxxxxxx> wrote:
[snip]
> +static inline int
> +__isolate_lru_page(struct zone *zone, struct page *page)
> +{
> + if (TestClearPageLRU(page)) {
> + if (get_page_testone(page)) {
> + /*
> + * It is being freed elsewhere
> + */
> + __put_page(page);
> + SetPageLRU(page);
> + return -ENOENT;

Ok, -ENOENT..

> -static int isolate_lru_pages(int nr_to_scan, struct list_head *src,
> - struct list_head *dst, int *scanned)
> +static int isolate_lru_pages(struct zone *zone, int nr_to_scan,
> + struct list_head *src, struct list_head *dst)
[snip]
> + switch (__isolate_lru_page(zone, page)) {
> + case 1:
> + /* Succeeded to isolate page */
> list_add(&page->lru, dst);
> - nr_taken++;
> + break;
> + case -1:
> + /* Not possible to isolate */
> + list_move(&page->lru, src);
> + break;
> + default:
> + BUG();

Huh, -1?

It looks like the V4 to V5 upgrade added -ENOENT as return value to
__isolate_lru_page(), but did not change the code in
isolate_lru_pages().

The fix for this is simple, but maybe something else needs to be
changed too or I'm misunderstanding what is happening here.

Andrew, this looks like a showstopper for 2.6.14-mm1.

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