* [PATCH mmotm] memcg: avoid vmpressure oops when memcg disabled
@ 2016-01-10 1:21 Hugh Dickins
2016-01-10 17:38 ` Johannes Weiner
0 siblings, 1 reply; 2+ messages in thread
From: Hugh Dickins @ 2016-01-10 1:21 UTC (permalink / raw)
To: Andrew Morton; +Cc: Johannes Weiner, linux-mm
A CONFIG_MEMCG=y kernel booted with "cgroup_disable=memory" crashes on
a NULL memcg (but non-NULL root_mem_cgroup) when vmpressure kicks in.
Here's the patch I use to avoid that, but you might prefer a test on
mem_cgroup_disabled() somewhere.
Signed-off-by: Hugh Dickins <hughd@google.com>
---
To be folded in to
mm-memcontrol-hook-up-vmpressure-to-socket-pressure.patch
if Hannes does not prefer to fix it differently.
mm/vmpressure.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 4.4-next/mm/vmpressure.c 2016-01-06 10:32:21.387741753 -0800
+++ linux/mm/vmpressure.c 2016-01-06 10:48:05.956149779 -0800
@@ -260,7 +260,7 @@ void vmpressure(gfp_t gfp, struct mem_cg
enum vmpressure_levels level;
/* For now, no users for root-level efficiency */
- if (memcg == root_mem_cgroup)
+ if (!memcg || memcg == root_mem_cgroup)
return;
spin_lock(&vmpr->sr_lock);
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH mmotm] memcg: avoid vmpressure oops when memcg disabled
2016-01-10 1:21 [PATCH mmotm] memcg: avoid vmpressure oops when memcg disabled Hugh Dickins
@ 2016-01-10 17:38 ` Johannes Weiner
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Weiner @ 2016-01-10 17:38 UTC (permalink / raw)
To: Hugh Dickins; +Cc: Andrew Morton, linux-mm
On Sat, Jan 09, 2016 at 05:21:44PM -0800, Hugh Dickins wrote:
> A CONFIG_MEMCG=y kernel booted with "cgroup_disable=memory" crashes on
> a NULL memcg (but non-NULL root_mem_cgroup) when vmpressure kicks in.
> Here's the patch I use to avoid that, but you might prefer a test on
> mem_cgroup_disabled() somewhere.
>
> Signed-off-by: Hugh Dickins <hughd@google.com>
Thanks Hugh. This looks good.
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-10 17:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-10 1:21 [PATCH mmotm] memcg: avoid vmpressure oops when memcg disabled Hugh Dickins
2016-01-10 17:38 ` Johannes Weiner
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).