linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: nishimura@mxp.nes.nec.co.jp,
	Linux Containers <containers@lists.osdl.org>,
	Linux MM <linux-mm@kvack.org>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Pavel Emelyanov <xemul@openvz.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
	Hugh Dickins <hugh@veritas.com>,
	IKEDA Munehiro <m-ikeda@ds.jp.nec.com>,
	Rik van Riel <riel@redhat.com>,
	Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Subject: Re: [PATCH -mm 4/5] swapcgroup (v3): modify vm_swap_full()
Date: Fri, 4 Jul 2008 19:40:59 +0900	[thread overview]
Message-ID: <20080704194059.efa7d0ed.nishimura@mxp.nes.nec.co.jp> (raw)
In-Reply-To: <20080704185845.0baaca76.kamezawa.hiroyu@jp.fujitsu.com>

Hi, Kamezawa-san.

On Fri, 4 Jul 2008 18:58:45 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Fri, 4 Jul 2008 15:22:44 +0900
> Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> 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.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2008-07-04 10:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-04  6:15 [PATCH -mm 0/5] swapcgroup (v3) Daisuke Nishimura
2008-07-04  6:17 ` [PATCH -mm 1/5] swapcgroup (v3): add cgroup files Daisuke Nishimura
2008-07-10 20:35   ` Dave Hansen
2008-07-11 11:02     ` Daisuke Nishimura
2008-07-04  6:18 ` [PATCH -mm 2/5] swapcgroup (v3): add a member to swap_info_struct Daisuke Nishimura
2008-07-04  6:20 ` [PATCH -mm 3/5] swapcgroup (v3): implement charge and uncharge Daisuke Nishimura
2008-07-04  6:22 ` [PATCH -mm 4/5] swapcgroup (v3): modify vm_swap_full() Daisuke Nishimura
2008-07-04  9:58   ` KAMEZAWA Hiroyuki
2008-07-04 10:40     ` Daisuke Nishimura [this message]
2008-07-04  6:24 ` [PATCH -mm 5/5] swapcgroup (v3): implement force_empty Daisuke Nishimura
2008-07-04  6:54   ` YAMAMOTO Takashi
2008-07-04  7:26     ` Daisuke Nishimura
2008-07-04  7:48       ` YAMAMOTO Takashi
2008-07-04  7:56         ` Daisuke Nishimura
2008-07-04 10:16   ` KAMEZAWA Hiroyuki
2008-07-04 12:33     ` Daisuke Nishimura
2008-07-05  4:29       ` KAMEZAWA Hiroyuki
2008-07-07  6:23         ` Daisuke Nishimura
2008-07-04  9:40 ` [PATCH -mm 0/5] swapcgroup (v3) KAMEZAWA Hiroyuki
2008-07-04 10:58   ` Daisuke Nishimura
2008-07-05  6:52 ` Balbir Singh
2008-07-07  6:48   ` Daisuke Nishimura

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080704194059.efa7d0ed.nishimura@mxp.nes.nec.co.jp \
    --to=nishimura@mxp.nes.nec.co.jp \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=hugh@veritas.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=m-ikeda@ds.jp.nec.com \
    --cc=riel@redhat.com \
    --cc=xemul@openvz.org \
    --cc=yamamoto@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox