linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] [PATCH -mm 0/2] memcg: per cgroup dirty_ratio
@ 2008-09-12 15:09 Andrea Righi
  2008-09-12 20:18 ` Andrew Morton
  0 siblings, 1 reply; 24+ messages in thread
From: Andrea Righi @ 2008-09-12 15:09 UTC (permalink / raw)
  To: Balbir Singh, Paul Menage, KAMEZAWA Hiroyuki
  Cc: Dave Hansen, Carl Henrik Lunde, Divyesh Shah, eric.rannaud,
	Fernando Luis Vázquez Cao, Andrew Morton, agk,
	Marco Innocenti, Satoshi UCHIDA, Ryo Tsuruta, Matt Heaton,
	David Radford, containers, LKML


The goal of the patch is to control how much dirty file pages a cgroup can have
at any given time (see also [1]).

Dirty file and writeback pages are accounted for each cgroup using the memory
controller statistics. Moreover, the dirty_ratio parameter is added to the
memory controller. It contains, as a percentage of the cgroup memory, the
number of dirty pages at which the processes belonging to the cgroup which are
generating disk writes will start writing out dirty data.

So, the behaviour is actually the same as the global dirty_ratio, except that
it works per cgroup.

Interface:
- two new entries "writeback" and "filedirty" are added to the file
  memory.stat, to export to userspace respectively the number of pages under
  writeback and the number of dirty file pages in the cgroup

- the new file memory.dirty_ratio is added in the cgroup filesystem to show/set
  the memcg dirty_ratio

[ This patch is still experimental and I only did few quick tests. I'd like to
do run more detailed benchmarks and compare the results, I guess the overhead
introduced by this patch shouldn't be so small... and BTW I would prefer a
dirty limit in bytes, intead of using a percentage of memory. Bytes are hugely
more flexible IMHO, they allow to define more fine-grained limits and so this
would work better on large memory machines. ]

[1] http://lkml.org/lkml/2008/9/9/245

-Andrea

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

end of thread, other threads:[~2008-11-10 22:17 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-12 15:09 [RFC] [PATCH -mm 0/2] memcg: per cgroup dirty_ratio Andrea Righi
2008-09-12 20:18 ` Andrew Morton
2008-09-12 23:04   ` Andrea Righi
2008-09-12 23:10     ` Andrew Morton
2008-09-22 22:26       ` Michael Rubin
2008-09-22 23:41   ` Michael Rubin
2008-09-23 12:50     ` Andrea Righi
2008-09-23 17:48     ` KOSAKI Motohiro
2008-09-23 20:21       ` Michael Rubin
2008-09-24  6:59         ` KOSAKI Motohiro
2008-10-07 10:35       ` Andrea Righi
2008-10-07 11:04     ` Balbir Singh
2008-10-07 15:49       ` Andrea Righi
2008-10-08  1:16         ` KAMEZAWA Hiroyuki
2008-10-08 13:13           ` Balbir Singh
2008-10-09 15:29             ` [PATCH -mm] page-writeback: fine-grained dirty_ratio and dirty_background_ratio Andrea Righi
2008-10-10  0:41               ` KAMEZAWA Hiroyuki
2008-10-10  9:32                 ` Andrea Righi
2008-10-10 13:13                   ` Andrea Righi
2008-11-10 20:58               ` [PATCH -mm] mm: fine-grained dirty_ratio_pcm and dirty_background_ratio_pcm (v2) Andrea Righi
2008-11-10 21:12                 ` Andrew Morton
2008-11-10 22:03                   ` Andrea Righi
2008-11-10 22:12                     ` Andrew Morton
2008-11-10 22:15                     ` David Rientjes

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