From: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
Gao feng <gaofeng@cn.fujitsu.com>,
hannes@cmpxchg.org, mhocko@suse.cz, bsingharora@gmail.com,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org, linux-mm@kvack.org,
containers@lists.linux-foundation.org
Subject: Re: [PATCH] meminfo: show /proc/meminfo base on container's memcg
Date: Thu, 31 May 2012 14:36:21 +0900 [thread overview]
Message-ID: <4FC70355.70805@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205302156090.25774@chino.kir.corp.google.com>
(2012/05/31 14:02), David Rientjes wrote:
> On Thu, 31 May 2012, Kamezawa Hiroyuki wrote:
>
>>> It's not just a memcg issue, it would also be a cpusets issue.
>>
>> I think you can add cpuset.meminfo.
>>
>
> It's simple to find the same information by reading the per-node meminfo
> files in sysfs for each of the allowed cpuset mems. This is why this
> approach has been nacked in the past, specifically by Paul Jackson when he
> implemented cpusets.
>
I don't think there was a discussion of LXC in that era.
> The bottomline is that /proc/meminfo is one of many global resource state
> interfaces and doesn't imply that every thread has access to the full
> resources. It never has. It's very simple for another thread to consume
> a large amount of memory as soon as your read() of /proc/meminfo completes
> and then that information is completely bogus.
Why you need to discuss this here ? We know all information are snapshot.
> We also don't want to
> virtualize every single global resource state interface, it would be never
> ending.
>
Just doing one by one. It will end.
> Applications that administer memory cgroups or cpusets can get this
> information very easily, each application within those memory cgroups or
> cpusets does not need it and should not rely on it: it provides no
> guarantee about future usage nor notifies the application when the amount
> of free memory changes.
If so, the admin should have know-how to get the information from the inside
of the container. If container is well-isolated, he'll need some
trick to get its own cgroup information from the inside of containers.
Hmm....maybe need to mount cgroup in the container (again) and get an access to cgroup
hierarchy and find the cgroup it belongs to......if it's allowed. I don't want to allow
it and disable it with capability or some other check. Another idea is to exchange
information by some network connection with daemon in root cgroup, like qemu-ga.
And free, top, ....misc applications should support it. It doesn't seem easy.
It may be better to think of supporting yet another FUSE procfs, which will work
with libvirt in userland if having it in the kernel is complicated.
Thanks,
-Kame
--
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>
next prev parent reply other threads:[~2012-05-31 5:38 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 2:56 [PATCH] meminfo: show /proc/meminfo base on container's memcg Gao feng
2012-05-29 8:24 ` Glauber Costa
2012-05-30 21:38 ` David Rientjes
2012-05-30 23:20 ` Kirill A. Shutemov
2012-05-31 0:35 ` David Rientjes
2012-05-31 0:08 ` Kamezawa Hiroyuki
2012-05-31 0:22 ` KOSAKI Motohiro
2012-05-31 0:33 ` Kamezawa Hiroyuki
2012-05-31 0:44 ` David Rientjes
2012-05-31 0:53 ` Kamezawa Hiroyuki
2012-05-31 1:31 ` David Rientjes
2012-05-31 2:33 ` Kamezawa Hiroyuki
2012-05-31 5:02 ` David Rientjes
2012-05-31 5:36 ` Kamezawa Hiroyuki [this message]
2012-05-31 6:17 ` David Rientjes
2012-05-31 6:23 ` KOSAKI Motohiro
2012-05-31 6:28 ` David Rientjes
2012-05-31 6:37 ` KOSAKI Motohiro
2012-05-31 6:56 ` David Rientjes
2012-05-31 7:09 ` KOSAKI Motohiro
2012-05-31 7:35 ` David Rientjes
2012-05-31 7:42 ` KOSAKI Motohiro
2012-05-31 7:57 ` Johannes Weiner
2012-05-31 7:58 ` Gao feng
2012-05-31 8:32 ` Glauber Costa
2012-05-31 8:51 ` Kamezawa Hiroyuki
2012-05-31 8:59 ` Glauber Costa
2012-05-31 8:55 ` Gao feng
2012-05-31 8:56 ` Glauber Costa
2012-05-31 7:07 ` Kamezawa Hiroyuki
2012-05-31 7:23 ` KOSAKI Motohiro
2012-05-31 8:29 ` Glauber Costa
2012-06-07 23:18 ` Zhu Yanhai
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=4FC70355.70805@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=bsingharora@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=containers@lists.linux-foundation.org \
--cc=gaofeng@cn.fujitsu.com \
--cc=hannes@cmpxchg.org \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=rientjes@google.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).