All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Joonsoo Kim <js1304@gmail.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Markus Trippelsdorf <markus@trippelsdorf.de>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: clarify COMPACTION Kconfig text
Date: Mon, 29 Aug 2016 16:50:47 +0200	[thread overview]
Message-ID: <20160829145047.GF2968@dhcp22.suse.cz> (raw)
In-Reply-To: <20160829141045.GB2172@cmpxchg.org>

On Mon 29-08-16 10:10:45, Johannes Weiner wrote:
> On Tue, Aug 23, 2016 at 10:09:17AM +0200, Michal Hocko wrote:
> > From: Michal Hocko <mhocko@suse.com>
> > 
> > The current wording of the COMPACTION Kconfig help text doesn't
> > emphasise that disabling COMPACTION might cripple the page allocator
> > which relies on the compaction quite heavily for high order requests and
> > an unexpected OOM can happen with the lack of compaction. Make sure
> > we are vocal about that.
> 
> I find it weird to even have this as a config option after we removed
> lumpy reclaim. Why offer a configuration that may easily OOM on allocs
> that we don't even consider "costly" to generate? There might be some
> specialized setups that know they can live without the higher-order
> allocations and rather have the savings in kernel size, but I'd argue
> that for the vast majority of Linux setups compaction is an essential
> part of our VM at this point. Seems like a candidate for EXPERT to me.

I was thinking about making it depend on EXPERT as well but then I just
felt like making the text more verbose should be sufficient. If somebody
runs a kernel without COMPACTION and doesn't see any issues then why
should we make life harder for him. But I was thinking about a different
thing. We should warn that the compaction is disabled when the oom
killer hits for higher order. What do you think?
--- 
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 10f686969fc4..b3c47072a206 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -406,6 +406,8 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
 	pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), order=%d, oom_score_adj=%hd\n",
 		current->comm, oc->gfp_mask, &oc->gfp_mask, oc->order,
 		current->signal->oom_score_adj);
+	if (!IS_ENABLED(COMPACTION) && oc->order)
+		pr_warn("COMPACTION is disabled!!!\n");
 
 	cpuset_print_current_mems_allowed();
 	dump_stack();

-- 
Michal Hocko
SUSE Labs

WARNING: multiple messages have this Message-ID (diff)
From: Michal Hocko <mhocko@kernel.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Joonsoo Kim <js1304@gmail.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Markus Trippelsdorf <markus@trippelsdorf.de>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: clarify COMPACTION Kconfig text
Date: Mon, 29 Aug 2016 16:50:47 +0200	[thread overview]
Message-ID: <20160829145047.GF2968@dhcp22.suse.cz> (raw)
In-Reply-To: <20160829141045.GB2172@cmpxchg.org>

On Mon 29-08-16 10:10:45, Johannes Weiner wrote:
> On Tue, Aug 23, 2016 at 10:09:17AM +0200, Michal Hocko wrote:
> > From: Michal Hocko <mhocko@suse.com>
> > 
> > The current wording of the COMPACTION Kconfig help text doesn't
> > emphasise that disabling COMPACTION might cripple the page allocator
> > which relies on the compaction quite heavily for high order requests and
> > an unexpected OOM can happen with the lack of compaction. Make sure
> > we are vocal about that.
> 
> I find it weird to even have this as a config option after we removed
> lumpy reclaim. Why offer a configuration that may easily OOM on allocs
> that we don't even consider "costly" to generate? There might be some
> specialized setups that know they can live without the higher-order
> allocations and rather have the savings in kernel size, but I'd argue
> that for the vast majority of Linux setups compaction is an essential
> part of our VM at this point. Seems like a candidate for EXPERT to me.

I was thinking about making it depend on EXPERT as well but then I just
felt like making the text more verbose should be sufficient. If somebody
runs a kernel without COMPACTION and doesn't see any issues then why
should we make life harder for him. But I was thinking about a different
thing. We should warn that the compaction is disabled when the oom
killer hits for higher order. What do you think?
--- 
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 10f686969fc4..b3c47072a206 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -406,6 +406,8 @@ static void dump_header(struct oom_control *oc, struct task_struct *p)
 	pr_warn("%s invoked oom-killer: gfp_mask=%#x(%pGg), order=%d, oom_score_adj=%hd\n",
 		current->comm, oc->gfp_mask, &oc->gfp_mask, oc->order,
 		current->signal->oom_score_adj);
+	if (!IS_ENABLED(COMPACTION) && oc->order)
+		pr_warn("COMPACTION is disabled!!!\n");
 
 	cpuset_print_current_mems_allowed();
 	dump_stack();

-- 
Michal Hocko
SUSE Labs

--
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>

  reply	other threads:[~2016-08-29 14:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23  8:09 [PATCH] mm: clarify COMPACTION Kconfig text Michal Hocko
2016-08-23  8:09 ` Michal Hocko
2016-08-23  8:38 ` Markus Trippelsdorf
2016-08-23  8:38   ` Markus Trippelsdorf
2016-08-23  9:17   ` Michal Hocko
2016-08-23  9:17     ` Michal Hocko
2016-08-25  0:54 ` David Rientjes
2016-08-25  0:54   ` David Rientjes
2016-08-25  6:54   ` Michal Hocko
2016-08-25  6:54     ` Michal Hocko
2016-08-25 22:34     ` David Rientjes
2016-08-25 22:34       ` David Rientjes
2016-08-26  6:44       ` Michal Hocko
2016-08-26  6:44         ` Michal Hocko
2016-08-29 14:10 ` Johannes Weiner
2016-08-29 14:10   ` Johannes Weiner
2016-08-29 14:50   ` Michal Hocko [this message]
2016-08-29 14:50     ` Michal Hocko

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=20160829145047.GF2968@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=markus@trippelsdorf.de \
    --cc=mgorman@suse.de \
    --cc=vbabka@suse.cz \
    /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.