Re: [PATCH] mm: Implement swap prefetching

From: Mattia Dongili
Date: Mon Feb 20 2006 - 14:08:21 EST


Hello Con,

On Tue, Feb 21, 2006 at 12:44:51AM +1100, Con Kolivas wrote:
> Unchanged heavily tested v27 implementation of swap prefetching resynced with
> 2.6.16-rc4-mm1.

I used your patches in the last 2 or 3 -mm kernels (since s-p-v24). It's
been working good until now.

> Please consider for -mm.

Just one minor note:
[...]
> Index: linux-2.6.16-rc4-mm1/mm/swap.c
> ===================================================================
> --- linux-2.6.16-rc4-mm1.orig/mm/swap.c 2006-02-21 00:38:56.000000000 +1100
> +++ linux-2.6.16-rc4-mm1/mm/swap.c 2006-02-21 00:39:25.000000000 +1100
> @@ -384,6 +384,46 @@ void __pagevec_lru_add_active(struct pag
> pagevec_reinit(pvec);
> }
>
> +static inline void __pagevec_lru_add_tail(struct pagevec *pvec)
> +{
> + int i;
> + struct zone *zone = NULL;
> +
> + for (i = 0; i < pagevec_count(pvec); i++) {
> + struct page *page = pvec->pages[i];
> + struct zone *pagezone = page_zone(page);
> +
> + if (pagezone != zone) {
> + if (zone)
> + spin_unlock_irq(&zone->lru_lock);
> + zone = pagezone;
> + spin_lock_irq(&zone->lru_lock);
> + }
> + if (TestSetPageLRU(page))
> + BUG();

TestSetPageLRU is gone in -mm (see mm-pagelru-no-testset.patch), you
should probably change it to

BUG_ON(PageLRU(page));
SetPageLRU(page);

ciao
--
mattia
:wq!
-
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/