linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Anton Vorontsov <anton.vorontsov@linaro.org>
To: Frank Rowand <frank.rowand@am.sony.com>
Cc: "David Rientjes" <rientjes@google.com>,
	"KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>,
	"Michal Hocko" <mhocko@suse.cz>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Rik van Riel" <riel@redhat.com>, "Pavel Machek" <pavel@ucw.cz>,
	"Greg Kroah-Hartman" <gregkh@suse.de>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"John Stultz" <john.stultz@linaro.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>,
	"Alan Cox" <alan@lxorguk.ukuu.org.uk>,
	tbird20d@gmail.com
Subject: Re: Android low memory killer vs. memory pressure notifications
Date: Wed, 21 Dec 2011 06:07:23 +0400	[thread overview]
Message-ID: <20111221020723.GA5214@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <4EF132EA.7000300@am.sony.com>

On Tue, Dec 20, 2011 at 05:14:18PM -0800, Frank Rowand wrote:
[...]
> >>> Hm, assuming that metadata is no longer an issue, why do you think avoiding
> >>> cgroups would be a good idea?
> >>>
> >>
> >> It's helpful for certain end users, particularly those in the embedded 
> >> world, to be able to disable as many config options as possible to reduce 
> >> the size of kernel image as much as possible, so they'll want a minimal 
> >> amount of kernel functionality that allows such notifications.  Keep in 
> >> mind that CONFIG_CGROUP_MEM_RES_CTLR is not enabled by default because of 
> >> this (enabling it, CONFIG_RESOURCE_COUNTERS, and CONFIG_CGROUPS increases 
> >> the size of the kernel text by ~1%),
> > 
> > So for 2MB kernel that's about 20KB of an additional text... This seems
> > affordable, especially as a trade-off for the things that cgroups may
> > provide.
> 
> A comment from http://lkml.indiana.edu/hypermail/linux/kernel/1102.1/00412.html:
> 
> "I care about 5K. (But honestly, I don't actively hunt stuff less than
> 10K in size, because there's too many of them to chase, currently)."

I have just tried to turn off CGROUPS on my qemu test kernels:

$ diff -u cgroups no_cgroups 
    text           data     bss     dec     hex filename
-3869810         465976  565248 4901034  4ac8aa vmlinux
+3806374         460544  540672 4807590  495ba6 vmlinux

So, that's actually ~60KB. Which is serious. memcontrol.o text size
is about 23KB.

And my cgroups setup was just this:

$ cat .config | grep CGRO
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
# CONFIG_CGROUP_FREEZER is not set
# CONFIG_CGROUP_DEVICE is not set
# CONFIG_CGROUP_CPUACCT is not set
CONFIG_CGROUP_MEM_RES_CTLR=y
# CONFIG_CGROUP_PERF is not set
# CONFIG_CGROUP_SCHED is not set
# CONFIG_BLK_CGROUP is not set

:-(

> > The fact is, for desktop and server Linux, cgroups slowly becomes a
> > mandatory thing. And the reason for this is that cgroups mechanism
> > provides some very useful features (in an extensible way, like plugins),
> > i.e. a way to manage and track processes and its resources -- which is the
> > main purpose of cgroups.
> 
> And for embedded and for real-time, some of us do not want cgroups to be
> a mandatory thing.  We want it to remain configurable.  My personal
> interest is in keeping the latency of certain critical paths (especially
> in the scheduler) short and consistent.

Much thanks for your input! That would be quite strong argument for going
with /dev/mem_notify approach. Do you have any specific numbers how cgroups
makes scheduler latencies worse?

Thanks!

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-12-21  2:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19  2:53 Android low memory killer vs. memory pressure notifications Anton Vorontsov
2011-12-19  7:48 ` Minchan Kim
2011-12-19 19:05   ` David Rientjes
2011-12-19 10:39 ` Alan Cox
2011-12-19 16:16   ` KOSAKI Motohiro
2011-12-19 16:24     ` Rik van Riel
2011-12-19 12:12 ` Michal Hocko
2011-12-19 19:12   ` David Rientjes
2011-12-20 14:56     ` Anton Vorontsov
2011-12-20 21:36       ` David Rientjes
2011-12-21  0:28         ` Anton Vorontsov
2011-12-21  1:14           ` Frank Rowand
2011-12-21  2:07             ` Anton Vorontsov [this message]
2011-12-21  2:30               ` Frank Rowand
2011-12-21 23:41                 ` Anton Vorontsov
2011-12-22  1:16             ` KOSAKI Motohiro
2011-12-22 18:53               ` Frank Rowand
2011-12-21  2:50           ` David Rientjes
2011-12-20  2:16   ` Anton Vorontsov
2011-12-19 16:11 ` KOSAKI Motohiro
2011-12-20  0:30   ` Hiroyuki Kamezawa
2011-12-19 17:30 ` KOSAKI Motohiro
2011-12-19 17:34   ` KOSAKI Motohiro

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=20111221020723.GA5214@oksana.dev.rtsoft.ru \
    --to=anton.vorontsov@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arve@android.com \
    --cc=frank.rowand@am.sony.com \
    --cc=gregkh@suse.de \
    --cc=hannes@cmpxchg.org \
    --cc=john.stultz@linaro.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=pavel@ucw.cz \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=tbird20d@gmail.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).