From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758217AbcH3LQh (ORCPT ); Tue, 30 Aug 2016 07:16:37 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33287 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757777AbcH3LQf (ORCPT ); Tue, 30 Aug 2016 07:16:35 -0400 Date: Tue, 30 Aug 2016 13:16:32 +0200 From: Michal Hocko To: Andrew Morton Cc: David Rientjes , Johannes Weiner , linux-mm@kvack.org, LKML Subject: Re: [PATCH] oom: warn if we go OOM for higher order and compaction is disabled Message-ID: <20160830111632.GD23963@dhcp22.suse.cz> References: <1472555667-30348-1-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1472555667-30348-1-git-send-email-mhocko@kernel.org> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ups, forgot to fold the fix up into the commit. --- >>From 32c000ea9beb18555ab368e4dd22bac1ca8370e8 Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Mon, 29 Aug 2016 17:08:20 +0200 Subject: [PATCH] oom: warn if we go OOM for higher order and compaction is disabled Since the lumpy reclaim is gone there is no source of higher order pages if CONFIG_COMPACTION=n except for the order-0 pages reclaim which is unreliable for that purpose to say the least. Hitting an OOM for !costly higher order requests is therefore all not that hard to imagine. We are trying hard to not invoke OOM killer as much as possible but there is simply no reliable way to detect whether more reclaim retries make sense. Disabling COMPACTION is not widespread but it seems that some users might have disable the feature without realizing full consequences (mostly along with disabling THP because compaction used to be THP mainly thing). This patch just adds a note if the OOM killer was triggered by higher order request with compaction disabled. This will help us identifying possible misconfiguration right from the oom report which is easier than to always keep in mind that somebody might have disabled COMPACTION without a good reason. Signed-off-by: Michal Hocko --- mm/oom_kill.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 10f686969fc4..0034baf35f0c 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(CONFIG_COMPACTION) && oc->order) + pr_warn("COMPACTION is disabled!!!\n"); cpuset_print_current_mems_allowed(); dump_stack(); -- 2.8.1 -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f72.google.com (mail-lf0-f72.google.com [209.85.215.72]) by kanga.kvack.org (Postfix) with ESMTP id 17DC283096 for ; Tue, 30 Aug 2016 07:16:35 -0400 (EDT) Received: by mail-lf0-f72.google.com with SMTP id p85so11394589lfg.3 for ; Tue, 30 Aug 2016 04:16:35 -0700 (PDT) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com. [74.125.82.66]) by mx.google.com with ESMTPS id 198si4022720wmi.81.2016.08.30.04.16.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Aug 2016 04:16:33 -0700 (PDT) Received: by mail-wm0-f66.google.com with SMTP id o80so2675054wme.0 for ; Tue, 30 Aug 2016 04:16:33 -0700 (PDT) Date: Tue, 30 Aug 2016 13:16:32 +0200 From: Michal Hocko Subject: Re: [PATCH] oom: warn if we go OOM for higher order and compaction is disabled Message-ID: <20160830111632.GD23963@dhcp22.suse.cz> References: <1472555667-30348-1-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1472555667-30348-1-git-send-email-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: David Rientjes , Johannes Weiner , linux-mm@kvack.org, LKML Ups, forgot to fold the fix up into the commit. ---