Hi, Kamezawa-san. On Fri, 4 Jul 2008 18:58:45 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote: > On Fri, 4 Jul 2008 15:22:44 +0900 > Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> wrote: > > > /* Swap 50% full? Release swapcache more aggressively.. */ > > -#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) > > +#define vm_swap_full(memcg) ((nr_swap_pages*2 < total_swap_pages) \ > > + || swap_cgroup_vm_swap_full(memcg)) > > + > > > Maybe nitpick but I like > == > vm_swap_full(page) ((nr_swap_pages *2 < total_swap_pages) > || swap_cgroup_vm_swap_full_page(page)) > == > rather than vm_swap_full(memcg) > Well, I used "page" in v2, but Kosaki-san said vm_swap_full() is not page-granularity operation so it should be changed. And more, > > @@ -1317,7 +1317,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, > > __mod_zone_page_state(zone, NR_LRU_BASE + lru, pgmoved); > > pgmoved = 0; > > spin_unlock_irq(&zone->lru_lock); > > - if (vm_swap_full()) > > + if (vm_swap_full(sc->mem_cgroup)) > > pagevec_swap_free(&pvec); > > __pagevec_release(&pvec); > > spin_lock_irq(&zone->lru_lock); > > @@ -1328,7 +1328,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, > > __count_zone_vm_events(PGREFILL, zone, pgscanned); > > __count_vm_events(PGDEACTIVATE, pgdeactivate); > > spin_unlock_irq(&zone->lru_lock); > > - if (vm_swap_full()) > > + if (vm_swap_full(sc->mem_cgroup)) > > pagevec_swap_free(&pvec); > > > > pagevec_release(&pvec); "page" cannot be determined in those places. I don't want to change pagevec_swap_free(), so I changed the argument of vm_swap_full(). > And could you change this to inline funcition ? > Of course. I think it would be better. Thanks, Daisuke Nishimura. _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers