From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Li Zefan <lizf@cn.fujitsu.com>, Paul Menage <menage@google.com>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
linux-mm <linux-mm@kvack.org>
Subject: [PATCH -mmotm 0/7] memcg: move charge at task migration (04/Dec)
Date: Fri, 4 Dec 2009 14:46:09 +0900 [thread overview]
Message-ID: <20091204144609.b61cc8c4.nishimura@mxp.nes.nec.co.jp> (raw)
Hi.
These are current patches of my move-charge-at-task-migration feature.
The biggest change from previous(19/Nov) version is improvement in performance.
I measured the elapsed time of "echo [pid] > <some path>/tasks" on KVM guest
with 4CPU/4GB(Xeon/3GHz) in three patterns:
(1) / -> /00
(2) /00 -> /01
we don't need to call res_counter_uncharge against root, so (1) would be smaller
than (2).
(3) /00(setting mem.limit to half size of total) -> /01
To compare the overhead of anon and swap.
In 19/Nov version:
| 252M | 512M | 1G
-----+--------+--------+--------
(1) | 0.21 | 0.41 | 0.821
-----+--------+--------+--------
(2) | 0.43 | 0.85 | 1.71
-----+--------+--------+--------
(3) | 0.40 | 0.81 | 1.62
-----+--------+--------+--------
In this version:
| 252M | 512M | 1G
-----+--------+--------+--------
(1) | 0.15 | 0.30 | 0.60
-----+--------+--------+--------
(2) | 0.15 | 0.30 | 0.60
-----+--------+--------+--------
(3) | 0.22 | 0.44 | 0.89
Please read patch descriptions for each patch([4/7],[7/7]) for details of
how and how much the patch improved the performance.
[1/7] cgroup: introduce cancel_attach()
[2/7] memcg: add interface to move charge at task migration
[3/7] memcg: move charges of anonymous page
[4/7] memcg: improbe performance in moving charge
[5/7] memcg: avoid oom during moving charge
[6/7] memcg: move charges of anonymous swap
[7/7] memcg: improbe performance in moving swap charge
Current version supports only recharge of non-shared(mapcount == 1) anonymous pages
and swaps of those pages. I think it's enough as a first step.
Overall history of this patch set:
2009/12/04
- rebase on mmotm-2009-11-24-16-47.
- change the term "recharge" to "move charge".
- improve performance in moving charge.
- parse the page table in can_attach() phase again(go back to the old behavior),
because it doesn't add so big overheads, so it would be better to calculate
the precharge count more accurately.
2009/11/19
- rebase on mmotm-2009-11-17-14-03 + KAMEZAWA-san's show per-process swap usage
via procfs patch(v3).
- in can_attach(), instead of parsing the page table, make use of per process
mm_counter(anon_rss, swap_usage).
- handle recharge_at_immigrate as bitmask(as I did in first version)
- use mm->owner instead of thread_group_leader()
2009/11/06
- remove "[RFC]".
- rebase on mmotm-2009-11-01-10-01.
- drop support for file cache and shmem/tmpfs(revisit in future).
- update Documentation/cgroup/memory.txt.
2009/10/13
- rebase on mmotm-2009-10-09-01-07 + KAMEZAWA-san's batched charge/uncharge(Oct09) + part
of KAMEZAWA-san's cleanup/fix patches(4,5,7 of Sep25 with some fixes).
- change the term "migrate" to "recharge".
2009/09/24
- change "migrate_charge" flag from "int" to "bool".
- in can_attach(), parse the page table of the task and count only the number
of target ptes and call try_charge() repeatedly. No isolation at this phase.
- in attach(), parse the page table of the task again, and isolate the target
page and call move_account() one by one.
- do no swap-in in moving swap account any more.
- add support for shmem/tmpfs's swap.
- update Documentation/cgroup/cgroup.txt.
2009/09/17
- first version
Regards,
Dasiuke 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>
next reply other threads:[~2009-12-04 6:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 5:46 Daisuke Nishimura [this message]
2009-12-04 5:47 ` [PATCH -mmotm 1/7] cgroup: introduce cancel_attach() Daisuke Nishimura
2009-12-04 5:48 ` [PATCH -mmotm 2/7] memcg: add interface to move charge at task migration Daisuke Nishimura
2009-12-04 6:55 ` KAMEZAWA Hiroyuki
2009-12-04 5:49 ` [PATCH -mmotm 3/7] memcg: move charges of anonymous page Daisuke Nishimura
2009-12-04 5:50 ` [PATCH -mmotm 4/7] memcg: improbe performance in moving charge Daisuke Nishimura
2009-12-04 7:10 ` KAMEZAWA Hiroyuki
2009-12-04 7:29 ` Daisuke Nishimura
2009-12-04 5:51 ` [PATCH -mmotm 5/7] memcg: avoid oom during " Daisuke Nishimura
2009-12-04 7:14 ` KAMEZAWA Hiroyuki
2009-12-04 7:43 ` Daisuke Nishimura
2009-12-04 5:52 ` [PATCH -mmotm 6/7] memcg: move charges of anonymous swap Daisuke Nishimura
2009-12-04 7:32 ` KAMEZAWA Hiroyuki
2009-12-04 10:53 ` Daisuke Nishimura
2009-12-04 5:54 ` [PATCH -mmotm 7/7] memcg: improbe performance in moving swap charge Daisuke Nishimura
2009-12-04 6:53 ` [PATCH -mmotm 0/7] memcg: move charge at task migration (04/Dec) KAMEZAWA Hiroyuki
2009-12-04 7:00 ` KAMEZAWA Hiroyuki
2009-12-07 6:34 ` Daisuke Nishimura
2009-12-09 0:21 ` KAMEZAWA Hiroyuki
2009-12-04 7:09 ` Daisuke Nishimura
2009-12-04 7:34 ` 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=20091204144609.b61cc8c4.nishimura@mxp.nes.nec.co.jp \
--to=nishimura@mxp.nes.nec.co.jp \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.com \
/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