From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"xemul@openvz.org" <xemul@openvz.org>,
"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>,
Andrew Morton <akpm@linux-foundation.org>,
"kosaki.motohiro@jp.fujitsu.com" <kosaki.motohiro@jp.fujitsu.com>,
"hugh@veritas.com" <hugh@veritas.com>
Subject: Re: [mmtom] please drop memcg-handle-swap-cache set (memcg handle swap cache rework).
Date: Sun, 20 Jul 2008 19:44:43 -0400 [thread overview]
Message-ID: <4883CDEB.2030403@linux.vnet.ibm.com> (raw)
In-Reply-To: <20080717124556.3e4b6e20.kamezawa.hiroyu@jp.fujitsu.com>
KAMEZAWA Hiroyuki wrote:
> Now, SwapCache is handled by memcg (in -mm) but it became complicated than I thought of.
>
> followings are queued in -mm now.
> memcg-handle-swap-cache.patch
> memcg-handle-swap-cache-fix.patch
> memcg-handle-swap-cache-fix-shmem-page-migration-incorrectness-on-memcgroup.patch
>
> And I have memcg-handle-shmem-swap-cache-fix.patch....
>
> Balbir argued that "This is too complicated!", ok, let's rework.
>
Thanks, it was complicated and simplification is always welcome!
> Andrew, could you drop above 3 patches ? I'd like to retry with clear logic.
>
> I'm testing this new version now. Basic logic is not changed but corner case
> handling is clearer than previous one. If there is something unclear,
> please tell me. I'd like to write easy-to-understand one.
>
> ==
> This patch tries to catch SwapCache usage by memcg in following Rule.
>
> 1. just ignore add_to_swap_cache()
> 2. if a page is uncharged,
> (a) don't uncharge when PageSwapCache(page)
> (b) don't uncharge when the page is mapped.
> (c) don't uncharge when the page is still on radix-tree.
> This can be checked by (page->mapping && !PageAnon(page))
>
> 3. __delete_from_swap_cache() calles uncharge after clearing PageSwapCache flag.
> 4. mem_cgroup_uncharge_cache() is called only after page->mapping is cleared.
> 5. migration has some corner case and handled.
>
My understanding of this patchset now is that
If the page was ever mapped or cached, we don't tweak add_to_swap_cache(),
instead, we keep the page around in the memcg, till it is removed from swap
cache. Is my understanding of your intent correct?
[snip]
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
--
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>
next prev parent reply other threads:[~2008-07-20 23:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 3:45 [mmtom] please drop memcg-handle-swap-cache set (memcg handle swap cache rework) KAMEZAWA Hiroyuki
2008-07-18 5:15 ` Daisuke Nishimura
2008-07-18 6:22 ` KAMEZAWA Hiroyuki
2008-07-18 8:26 ` Daisuke Nishimura
2008-07-20 23:44 ` Balbir Singh [this message]
2008-07-28 8:22 ` kamezawa.hiroyu
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=4883CDEB.2030403@linux.vnet.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=xemul@openvz.org \
/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.