Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253606
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: memcontrol: eliminate root memory.current |
| Date | 2015-10-22 11:10 +0200 |
| Message-ID | <qmk2J-69B-15@gated-at.bofh.it> (permalink) |
| References | <qm6Ma-3fF-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed 21-10-15 14:49:54, Johannes Weiner wrote:
> memory.current on the root level doesn't add anything that wouldn't be
> more accurate and detailed using system statistics. It already doesn't
> include slabs, and it'll be a pain to keep in sync when further memory
> types are accounted in the memory controller. Remove it.
>
> Note that this applies to the new unified hierarchy interface only.
OK, I can understand your reasoning, other knobs are !root as well.
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
After the bug mentioned below is fixed
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> mm/memcontrol.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Tejun, we should probably do this with the other controllers too.
> I don't think it makes sense anywhere to shoddily duplicate the
> system statistics on the controller root levels.
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 4f04510..c71fe40 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -5022,7 +5022,7 @@ static void mem_cgroup_bind(struct cgroup_subsys_state *root_css)
> static u64 memory_current_read(struct cgroup_subsys_state *css,
> struct cftype *cft)
> {
> - return mem_cgroup_usage(mem_cgroup_from_css(css), false);
> + return page_counter_read(&mem_cgroup_from_css(css)->memory);
We want that in bytes though.
> }
>
> static int memory_low_show(struct seq_file *m, void *v)
> @@ -5134,6 +5134,7 @@ static int memory_events_show(struct seq_file *m, void *v)
> static struct cftype memory_files[] = {
> {
> .name = "current",
> + .flags = CFTYPE_NOT_ON_ROOT,
> .read_u64 = memory_current_read,
> },
> {
> --
> 2.6.1
--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm: memcontrol: eliminate root memory.current Johannes Weiner <hannes@cmpxchg.org> - 2015-10-21 21:00 +0200
Re: [PATCH] mm: memcontrol: eliminate root memory.current Michal Hocko <mhocko@kernel.org> - 2015-10-22 11:10 +0200
Re: [PATCH] mm: memcontrol: eliminate root memory.current Johannes Weiner <hannes@cmpxchg.org> - 2015-10-22 14:30 +0200
csiph-web