From: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
To: Vladimir Davydov <vdavydov-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
Cc: Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-team-b10kYP2dOMg@public.gmane.org
Subject: Re: [PATCH 2/4] mm: memcontrol: reign in the CONFIG space madness
Date: Sat, 12 Dec 2015 12:20:57 -0500 [thread overview]
Message-ID: <20151212172057.GA7997@cmpxchg.org> (raw)
In-Reply-To: <20151212163332.GC28521@esperanza>
On Sat, Dec 12, 2015 at 07:33:32PM +0300, Vladimir Davydov wrote:
> On Fri, Dec 11, 2015 at 02:54:11PM -0500, Johannes Weiner wrote:
> > What CONFIG_INET and CONFIG_LEGACY_KMEM guard inside the memory
> > controller code is insignificant, having these conditionals is not
> > worth the complication and fragility that comes with them.
> >
> > Signed-off-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
>
> Acked-by: Vladimir Davydov <vdavydov-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
>
> > @@ -4374,17 +4342,11 @@ static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
> > {
> > struct mem_cgroup *memcg = mem_cgroup_from_css(css);
> >
> > -#ifdef CONFIG_INET
> > if (cgroup_subsys_on_dfl(memory_cgrp_subsys) && !cgroup_memory_nosocket)
> > static_branch_dec(&memcg_sockets_enabled_key);
> > -#endif
> > -
> > - memcg_free_kmem(memcg);
>
> I wonder where the second call to memcg_free_kmem comes from. Luckily,
> it couldn't result in a breakage. And now it's removed.
Lol, I had to double check my trees to see what's going on as I don't
remember this being part of the patch. But it looks like the double
free came from the "net: drop tcp_memcontrol.c" patch and I must have
removed it again during conflict resolution when rebasing this patch
on top of yours. I must have thought git's auto-merge added it.
However, this causes an underflow of the kmem static branch, so we
will have to fix this directly in "net: drop tcp_memcontrol.c".
Andrew, could you please pick this up? However, it's important to also
then remove the hunk above from THIS patch, the one that deletes the
excessive memcg_free_kmem(). We need exactly one memcg_free_kmem() in
mem_cgroup_css_free(). :-)
From 94a14b7b0f7ed5b5ac88ca285a7e8ec3215ea59c Mon Sep 17 00:00:00 2001
From: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
Date: Sat, 12 Dec 2015 12:14:31 -0500
Subject: [PATCH] net: drop tcp_memcontrol.c fix
Signed-off-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
---
mm/memcontrol.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5cf7fd2..a4ce8d3 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4386,8 +4386,6 @@ static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
static_branch_dec(&memcg_sockets_enabled_key);
#endif
- memcg_free_kmem(memcg);
-
__mem_cgroup_free(memcg);
}
--
2.6.4
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.cz>,
linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 2/4] mm: memcontrol: reign in the CONFIG space madness
Date: Sat, 12 Dec 2015 12:20:57 -0500 [thread overview]
Message-ID: <20151212172057.GA7997@cmpxchg.org> (raw)
In-Reply-To: <20151212163332.GC28521@esperanza>
On Sat, Dec 12, 2015 at 07:33:32PM +0300, Vladimir Davydov wrote:
> On Fri, Dec 11, 2015 at 02:54:11PM -0500, Johannes Weiner wrote:
> > What CONFIG_INET and CONFIG_LEGACY_KMEM guard inside the memory
> > controller code is insignificant, having these conditionals is not
> > worth the complication and fragility that comes with them.
> >
> > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
>
> Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com>
>
> > @@ -4374,17 +4342,11 @@ static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
> > {
> > struct mem_cgroup *memcg = mem_cgroup_from_css(css);
> >
> > -#ifdef CONFIG_INET
> > if (cgroup_subsys_on_dfl(memory_cgrp_subsys) && !cgroup_memory_nosocket)
> > static_branch_dec(&memcg_sockets_enabled_key);
> > -#endif
> > -
> > - memcg_free_kmem(memcg);
>
> I wonder where the second call to memcg_free_kmem comes from. Luckily,
> it couldn't result in a breakage. And now it's removed.
Lol, I had to double check my trees to see what's going on as I don't
remember this being part of the patch. But it looks like the double
free came from the "net: drop tcp_memcontrol.c" patch and I must have
removed it again during conflict resolution when rebasing this patch
on top of yours. I must have thought git's auto-merge added it.
However, this causes an underflow of the kmem static branch, so we
will have to fix this directly in "net: drop tcp_memcontrol.c".
Andrew, could you please pick this up? However, it's important to also
then remove the hunk above from THIS patch, the one that deletes the
excessive memcg_free_kmem(). We need exactly one memcg_free_kmem() in
mem_cgroup_css_free(). :-)
WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.cz>,
linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 2/4] mm: memcontrol: reign in the CONFIG space madness
Date: Sat, 12 Dec 2015 12:20:57 -0500 [thread overview]
Message-ID: <20151212172057.GA7997@cmpxchg.org> (raw)
In-Reply-To: <20151212163332.GC28521@esperanza>
On Sat, Dec 12, 2015 at 07:33:32PM +0300, Vladimir Davydov wrote:
> On Fri, Dec 11, 2015 at 02:54:11PM -0500, Johannes Weiner wrote:
> > What CONFIG_INET and CONFIG_LEGACY_KMEM guard inside the memory
> > controller code is insignificant, having these conditionals is not
> > worth the complication and fragility that comes with them.
> >
> > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
>
> Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com>
>
> > @@ -4374,17 +4342,11 @@ static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
> > {
> > struct mem_cgroup *memcg = mem_cgroup_from_css(css);
> >
> > -#ifdef CONFIG_INET
> > if (cgroup_subsys_on_dfl(memory_cgrp_subsys) && !cgroup_memory_nosocket)
> > static_branch_dec(&memcg_sockets_enabled_key);
> > -#endif
> > -
> > - memcg_free_kmem(memcg);
>
> I wonder where the second call to memcg_free_kmem comes from. Luckily,
> it couldn't result in a breakage. And now it's removed.
Lol, I had to double check my trees to see what's going on as I don't
remember this being part of the patch. But it looks like the double
free came from the "net: drop tcp_memcontrol.c" patch and I must have
removed it again during conflict resolution when rebasing this patch
on top of yours. I must have thought git's auto-merge added it.
However, this causes an underflow of the kmem static branch, so we
will have to fix this directly in "net: drop tcp_memcontrol.c".
Andrew, could you please pick this up? However, it's important to also
then remove the hunk above from THIS patch, the one that deletes the
excessive memcg_free_kmem(). We need exactly one memcg_free_kmem() in
mem_cgroup_css_free(). :-)
>From 94a14b7b0f7ed5b5ac88ca285a7e8ec3215ea59c Mon Sep 17 00:00:00 2001
From: Johannes Weiner <hannes@cmpxchg.org>
Date: Sat, 12 Dec 2015 12:14:31 -0500
Subject: [PATCH] net: drop tcp_memcontrol.c fix
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
mm/memcontrol.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5cf7fd2..a4ce8d3 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4386,8 +4386,6 @@ static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
static_branch_dec(&memcg_sockets_enabled_key);
#endif
- memcg_free_kmem(memcg);
-
__mem_cgroup_free(memcg);
}
--
2.6.4
next prev parent reply other threads:[~2015-12-12 17:20 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 19:54 [PATCH 1/4] net: tcp_memcontrol: simplify linkage between socket and page counter fix Johannes Weiner
2015-12-11 19:54 ` Johannes Weiner
2015-12-11 19:54 ` Johannes Weiner
2015-12-11 19:54 ` [PATCH 2/4] mm: memcontrol: reign in the CONFIG space madness Johannes Weiner
2015-12-11 19:54 ` Johannes Weiner
2015-12-12 16:33 ` Vladimir Davydov
2015-12-12 16:33 ` Vladimir Davydov
2015-12-12 17:20 ` Johannes Weiner [this message]
2015-12-12 17:20 ` Johannes Weiner
2015-12-12 17:20 ` Johannes Weiner
[not found] ` <20151212172057.GA7997-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2015-12-22 23:11 ` Andrew Morton
2015-12-22 23:11 ` Andrew Morton
2015-12-22 23:11 ` Andrew Morton
[not found] ` <20151222151138.0c35816e53b0f0ad940568bb-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2015-12-22 23:15 ` Andrew Morton
2015-12-22 23:15 ` Andrew Morton
2015-12-22 23:15 ` Andrew Morton
[not found] ` <20151222151527.b4fd06da45d5c86d193c773d-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2015-12-22 23:38 ` Johannes Weiner
2015-12-22 23:38 ` Johannes Weiner
2015-12-22 23:38 ` Johannes Weiner
2015-12-11 19:54 ` [PATCH 3/4] mm: memcontrol: flatten struct cg_proto Johannes Weiner
2015-12-11 19:54 ` Johannes Weiner
[not found] ` <1449863653-6546-3-git-send-email-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2015-12-12 16:39 ` Vladimir Davydov
2015-12-12 16:39 ` Vladimir Davydov
2015-12-12 16:39 ` Vladimir Davydov
2015-12-11 19:54 ` [PATCH 4/4] mm: memcontrol: clean up alloc, online, offline, free functions Johannes Weiner
2015-12-11 19:54 ` Johannes Weiner
[not found] ` <1449863653-6546-4-git-send-email-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2015-12-14 17:14 ` Vladimir Davydov
2015-12-14 17:14 ` Vladimir Davydov
2015-12-14 17:14 ` Vladimir Davydov
2015-12-15 19:38 ` Johannes Weiner
2015-12-15 19:38 ` Johannes Weiner
2015-12-15 19:38 ` Johannes Weiner
[not found] ` <20151215193858.GA15265-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2015-12-16 12:17 ` Vladimir Davydov
2015-12-16 12:17 ` Vladimir Davydov
2015-12-16 12:17 ` Vladimir Davydov
2015-12-17 0:44 ` Johannes Weiner
2015-12-17 0:44 ` Johannes Weiner
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=20151212172057.GA7997@cmpxchg.org \
--to=hannes-druugvl0lcnafugrpc6u6w@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kernel-team-b10kYP2dOMg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=mhocko-AlSwsSmVLrQ@public.gmane.org \
--cc=vdavydov-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.