Messages in this thread | | | Date | Wed, 28 May 2008 18:08:02 +0900 | From | Daisuke Nishimura <> | Subject | Re: [PATCH -mm 04/16] free swap space on swap-in/activation |
| |
> @@ -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.
| |