Re: [PATCH -mm 04/16] free swap space on swap-in/activation

From: Daisuke Nishimura
Date: Wed May 28 2008 - 05:09:05 EST


> @@ -1203,6 +1206,8 @@ static void shrink_active_list(unsigned
> __mod_zone_page_state(zone, NR_ACTIVE, pgmoved);
> pgmoved = 0;
> spin_unlock_irq(&zone->lru_lock);
> + if (vm_swap_full())
> + pagevec_swap_free(&pvec);
> __pagevec_release(&pvec);
> spin_lock_irq(&zone->lru_lock);
> }
> @@ -1212,6 +1217,8 @@ static void shrink_active_list(unsigned
> __count_zone_vm_events(PGREFILL, zone, pgscanned);
> __count_vm_events(PGDEACTIVATE, pgdeactivate);
> spin_unlock_irq(&zone->lru_lock);
> + if (vm_swap_full())
> + pagevec_swap_free(&pvec);
>
> pagevec_release(&pvec);
> }

I'm sorry if I misunderstand your patches, but is this part needed
after
[PATCH -mm 07/16] second chance replacement for anonymous pages
is applied?
After the patch, if shrink_active_list() is called about
anon pages(that is, with file=0), those pages should go to inactive list,
so they should not be removed from swap cache, should they?


Thanks,
Daisuke Nishimura.

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