From: Randy Dunlap on 14 Apr 2010 14:20 > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu(a)jp.fujitsu.com> > --- > Documentation/cgroups/memory.txt | 289 ++++++++++++++++++++++++++------------- > 1 file changed, 197 insertions(+), 92 deletions(-) > > Index: mmotm-temp/Documentation/cgroups/memory.txt > =================================================================== > --- mmotm-temp.orig/Documentation/cgroups/memory.txt > +++ mmotm-temp/Documentation/cgroups/memory.txt > @@ -1,18 +1,15 @@ > Memory Resource Controller > > NOTE: The Memory Resource Controller has been generically been referred > -to as the memory controller in this document. Do not confuse memory controller > -used here with the memory controller that is used in hardware. > + to as the memory controller in this document. Do not confuse memory > + controller used here with the memory controller that is used in hardware. > > -Salient features > - > -a. Enable control of Anonymous, Page Cache (mapped and unmapped) and > - Swap Cache memory pages. > -b. The infrastructure allows easy addition of other types of memory to control > -c. Provides *zero overhead* for non memory controller users > -d. Provides a double LRU: global memory pressure causes reclaim from the > - global LRU; a cgroup on hitting a limit, reclaims from the per > - cgroup LRU > +(For editors) > +In this document: > + When we mention a cgroup (cgroupfs's directory) with memory controller, > + we call it "memory cgroup". When you see git-log and source code, you'll > + see patch's title and function names tend to use "memcg". > + In this document, we avoid to use it. we avoid using it. > > Benefits and Purpose of the memory controller > @@ -501,27 +605,28 @@ It's applicable for root and non-root cg > > memory.oom_control file is for OOM notification and other controls. > > -Memory controler implements oom notifier using cgroup notification > -API (See cgroups.txt). It allows to register multiple oom notification > -delivery and gets notification when oom happens. > +Memory cgroup implements OOM notifier using cgroup notification > +API (See cgroups.txt). It allows to register multiple OOM notification > +delivery and gets notification when OOM happens. > > To register a notifier, application need: > - create an eventfd using eventfd(2) > - open memory.oom_control file > - - write string like "<event_fd> <memory.oom_control>" to cgroup.event_control > + - write string like "<event_fd> <fd of memory.oom_control>" to > + cgroup.event_control > > -Application will be notifier through eventfd when oom happens. > +Application will be notified through eventfd when OOM happens. > OOM notification doesn't work for root cgroup. > > -You can disable oom-killer by writing "1" to memory.oom_control file. > +You can disable OOM-killer by writing "1" to memory.oom_control file. > As. to memory.oom_control file, as: > #echo 1 > memory.oom_control BTW: it would be a lot easier [for reviewing] if you could freeze (or merge) this version and then apply fixes on top of it with a different (and shorter) patch. Reviewed-by: Randy Dunlap <randy.dunlap(a)oracle.com> --- ~Randy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: Handling macros with input devices Next: [GIT PULL] ceph fixes for 2.6.34-rc5 |