All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daisuke Nishimura <d-nishimura@mtf.biglobe.ne.jp>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
	"xemul@openvz.org" <xemul@openvz.org>,
	"yamamoto@valinux.co.jp" <yamamoto@valinux.co.jp>,
	lizf@cn.fujitsu.com, Hugh Dickins <hugh@veritas.com>,
	"IKEDA, Munehiro" <m-ikeda@ds.jp.nec.com>
Subject: Re: [RFC][PATCH 3/3] account swapcache
Date: Mon, 14 Apr 2008 17:36:05 +0900	[thread overview]
Message-ID: <48031775.10008@mtf.biglobe.ne.jp> (raw)
In-Reply-To: <20080414172321.b97c4eb9.kamezawa.hiroyu@jp.fujitsu.com>

KAMEZAWA Hiroyuki wrote:
> On Mon, 14 Apr 2008 17:03:53 +0900
> Daisuke Nishimura <d-nishimura@mtf.biglobe.ne.jp> wrote:
> 
>> I was thinking the case below.
>> Assume some anonymous pages(mapped, referenced, !SwapCache)
>> are being reclaimed.
>>
> 
> Numbering for below.
> 
> (1) > shrink_page_list()
> (2)> 	-> add_to_swap() <- makes the page dirty.
> (3)> 	->  try_to_unmap() <- uncharged from memcg and removed from mz->lru.
> (4)> 	-> PageDirty() == true
> (5)> 		sc->order <= PAGE_ALLOC_COSTLY_ORDER && referenced
> (6)> 			goto keep_locked
> (7)> 	-> unlocks the page and will work on other pages on page_list.
>> And, if on other CPU the process that owns those pages is exiting
>> at the timing of my example above, those pages remain only on
>> global lru, and are never charged(mapped) because the process exits.
>>
>> I said "never" because once they are removed from mz->lru,
>> mem_cgroup_isolate_pages() doesn't select those pages
>> unless they are charged(mapped) again.
>>
> I'm sorry if I don't catch your points.
> 
> Because of (1), it's marked as SwapCache.
> At (2) , page is not removed from mz->lru because it's SwapCache. (see my patch)
> page is still on mz->lru after (7).
> 
> After a process exits, this page will be reclaimed when page-recalim for
> page_cgroup find this.
> 
> Thanks,
> -Kame
> 
I was saying the case when swapcaches are not charged.
I showed one of the problems if they are not charged.

Sorry for confusing you.

I agree that your patch handles this case :-)


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-04-14  8:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080408190734.70ab55b0.kamezawa.hiroyu@jp.fujitsu.com>
2008-04-11  4:57 ` [RFC][PATCH 0/3] memcg: remove refcnt Balbir Singh
     [not found] ` <20080408191311.73b167bb.kamezawa.hiroyu@jp.fujitsu.com>
2008-04-11 12:20   ` [RFC][PATCH 3/3] account swapcache Daisuke Nishimura
2008-04-14  0:47     ` KAMEZAWA Hiroyuki
2008-04-14  8:03       ` Daisuke Nishimura
2008-04-14  8:23         ` KAMEZAWA Hiroyuki
2008-04-14  8:36           ` Daisuke Nishimura [this message]
2008-04-14  8:45             ` KAMEZAWA Hiroyuki

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=48031775.10008@mtf.biglobe.ne.jp \
    --to=d-nishimura@mtf.biglobe.ne.jp \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=hugh@veritas.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=m-ikeda@ds.jp.nec.com \
    --cc=nishimura@mxp.nes.nec.co.jp \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.