cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] memcg: disable swap cgroup allocation at swapon
@ 2013-01-28 10:54 Jeff Liu
  2013-01-28 10:54 ` [PATCH v2 1/6] memcg: refactor swap_cgroup_swapon() Jeff Liu
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Jeff Liu @ 2013-01-28 10:54 UTC (permalink / raw)
  To: linux-mm; +Cc: Michal Hocko, Glauber Costa, cgroups

Hello,

Here is the v2 patch set for disabling swap_cgroup structures allocation
per swapon.

In the initial version, one big issue is that I have missed the swap tracking
for the root memcg, thanks Michal pointing it out. :)

In order to solve it, the easiest approach I can think out is to bypass the root
memcg swap accounting during the business and figure it out with some global stats,
which means that we always return 0 per root memcg swap charge/uncharge stage, and
this is inspired by another proposal from Zhengju:
"memcg: Don't account root memcg page statistics -- https://lkml.org/lkml/2013/1/2/71"

Besides that, another major fix is deallocate swap accounting structures on the last
non-root memcg remove after all references to it are gone rather than doing it on
mem_cgroup_destroy().

Any comment are welcome!

v1->v2:
- Refactor swap_cgroup_swapon()/swap_cgroup_prepare(), to make the later can be
  used for allocating buffers per the first non-root memcg creation.
- Bypass root memcg swap statistics, using the global stats to figure it out instead.
- Export nr_swap_files which would be used when creating/freeing swap_cgroup
- Deallocate swap accounting structures on the last non-root memcg removal

Old patch set:
v1:
http://marc.info/?l=linux-mm&m=135461016823964&w=2


Thanks,
-Jeff

--
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>

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2013-01-29 16:50 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 10:54 [PATCH v2 0/6] memcg: disable swap cgroup allocation at swapon Jeff Liu
2013-01-28 10:54 ` [PATCH v2 1/6] memcg: refactor swap_cgroup_swapon() Jeff Liu
     [not found]   ` <510658E6.9030108-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-01-29  9:15     ` Lord Glauber Costa of Sealand
2013-01-29 13:41     ` Michal Hocko
2013-01-28 10:54 ` [PATCH v2 3/6] memcg: introduce memsw_accounting_users Jeff Liu
     [not found]   ` <510658F0.9050802-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-01-29  9:46     ` Lord Glauber Costa of Sealand
2013-01-29 10:52       ` Jeff Liu
2013-01-29 14:26       ` Michal Hocko
2013-01-29 14:24     ` Michal Hocko
2013-01-29 15:16       ` Jeff Liu
2013-01-28 10:54 ` [PATCH v2 4/6] memcg: export nr_swap_files Jeff Liu
     [not found]   ` <510658F6.4010504-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-01-29  9:47     ` Lord Glauber Costa of Sealand
2013-01-29 14:31     ` Michal Hocko
2013-01-29 15:17       ` Jeff Liu
2013-01-28 10:54 ` [PATCH v2 5/6] memcg: introduce swap_cgroup_init()/swap_cgroup_free() Jeff Liu
2013-01-29  9:57   ` Lord Glauber Costa of Sealand
2013-01-29 10:21     ` Jeff Liu
     [not found]   ` <510658F7.6050806-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-01-29 14:56     ` Michal Hocko
2013-01-29 15:51       ` Jeff Liu
     [not found]         ` <5107F00E.7070302-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-01-29 16:09           ` Michal Hocko
2013-01-28 10:54 ` [PATCH v2 6/6] memcg: init/free swap cgroup strucutres upon create/free child memcg Jeff Liu
     [not found]   ` <510658FC.50009-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-01-29  9:59     ` Lord Glauber Costa of Sealand
2013-01-29 10:27       ` Jeff Liu
2013-01-29 15:11     ` Michal Hocko
     [not found] ` <510658E3.1020306-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-01-29 15:15   ` [PATCH v2 0/6] memcg: disable swap cgroup allocation at swapon Michal Hocko
2013-01-29 16:50     ` Jeff Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).