From: Andrea Righi <arighi@develer.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Vivek Goyal <vgoyal@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Trond Myklebust <trond.myklebust@fys.uio.no>,
Suleiman Souhlal <suleiman@google.com>,
Greg Thelen <gthelen@google.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
Andrew Morton <akpm@linux-foundation.org>,
containers@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH -mmotm 0/4] memcg: per cgroup dirty limit (v5)
Date: Sun, 7 Mar 2010 21:57:50 +0100 [thread overview]
Message-ID: <1267995474-9117-1-git-send-email-arighi@develer.com> (raw)
Control the maximum amount of dirty pages a cgroup can have at any given time.
Per cgroup dirty limit is like fixing the max amount of dirty (hard to reclaim)
page cache used by any cgroup. So, in case of multiple cgroup writers, they
will not be able to consume more than their designated share of dirty pages and
will be forced to perform write-out if they cross that limit.
The overall design is the following:
- account dirty pages per cgroup
- limit the number of dirty pages via memory.dirty_ratio / memory.dirty_bytes
and memory.dirty_background_ratio / memory.dirty_background_bytes in
cgroupfs
- start to write-out (directly or background) when the cgroup limits are
exceeded
This feature is supposed to be strictly connected to any underlying IO
controller implementation, so we can stop increasing dirty pages in VM layer
and enforce a write-out before any cgroup will consume the global amount of
dirty pages defined by /proc/sys/vm/dirty_ratio|dirty_bytes and
/proc/sys/vm/dirty_background_ratio|dirty_background_bytes.
Changelog (v4 -> v5)
~~~~~~~~~~~~~~~~~~~~~~
* fixed a potential deadlock between lock_page_cgroup and mapping->tree_lock
(I'm not sure I did the right thing for this point, so review and tests are
very welcome)
* introduce inc/dec functions to update file cache accounting
* export only a restricted subset of mem_cgroup_stat_index flags
* fixed a bug in determine_dirtyable_memory() to correctly return the local
memcg dirtyable memory
* always use global dirty memory settings in calc_period_shift()
-Andrea
--
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:[~2010-03-07 20:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-07 20:57 Andrea Righi [this message]
2010-03-07 20:57 ` [PATCH -mmotm 1/4] memcg: dirty memory documentation Andrea Righi
2010-03-07 20:57 ` [PATCH -mmotm 2/4] page_cgroup: introduce file cache flags Andrea Righi
2010-03-07 20:57 ` [PATCH -mmotm 3/4] memcg: dirty pages accounting and limiting infrastructure Andrea Righi
2010-03-08 1:44 ` Daisuke Nishimura
2010-03-08 1:56 ` KAMEZAWA Hiroyuki
2010-03-08 2:17 ` Daisuke Nishimura
2010-03-08 2:37 ` KAMEZAWA Hiroyuki
2010-03-08 8:07 ` Daisuke Nishimura
2010-03-08 8:31 ` KAMEZAWA Hiroyuki
2010-03-09 0:12 ` Andrea Righi
2010-03-09 0:19 ` KAMEZAWA Hiroyuki
2010-03-09 1:29 ` [PATCH mmotm 2.5/4] memcg: disable irq at page cgroup lock (Re: [PATCH -mmotm 3/4] memcg: dirty pages accounting and limiting infrastructure) Daisuke Nishimura
2010-03-09 2:07 ` KAMEZAWA Hiroyuki
2010-03-09 4:50 ` Balbir Singh
2010-03-10 1:43 ` Daisuke Nishimura
2010-03-10 3:56 ` Balbir Singh
2010-03-11 4:31 ` Daisuke Nishimura
2010-03-11 4:49 ` KAMEZAWA Hiroyuki
2010-03-11 4:58 ` Daisuke Nishimura
2010-03-11 5:13 ` KAMEZAWA Hiroyuki
2010-03-11 6:15 ` KAMEZAWA Hiroyuki
2010-03-11 7:50 ` Daisuke Nishimura
2010-03-11 8:06 ` KAMEZAWA Hiroyuki
2010-03-11 16:54 ` Vivek Goyal
2010-03-11 22:34 ` Andrea Righi
2010-03-11 23:46 ` KAMEZAWA Hiroyuki
2010-03-09 9:07 ` Andrea Righi
2010-03-09 0:18 ` [PATCH -mmotm 3/4] memcg: dirty pages accounting and limiting infrastructure Daisuke Nishimura
2010-03-09 0:20 ` KAMEZAWA Hiroyuki
2010-03-09 0:52 ` Daisuke Nishimura
2010-03-09 0:03 ` Andrea Righi
2010-03-07 20:57 ` [PATCH -mmotm 4/4] memcg: dirty pages instrumentation Andrea Righi
2010-03-08 2:31 ` 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=1267995474-9117-1-git-send-email-arighi@develer.com \
--to=arighi@develer.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=gthelen@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=peterz@infradead.org \
--cc=suleiman@google.com \
--cc=trond.myklebust@fys.uio.no \
--cc=vgoyal@redhat.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;
as well as URLs for NNTP newsgroup(s).