Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3397753imm; Tue, 17 Jul 2018 04:17:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpde6ZfJPumqicn3MCavzepsvNHdW4ZjU8hgArD6lB6y1pmyaR7EtBVQunOba/LBYMvtoe5E X-Received: by 2002:a17:902:9f81:: with SMTP id g1-v6mr1211167plq.304.1531826245409; Tue, 17 Jul 2018 04:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531826245; cv=none; d=google.com; s=arc-20160816; b=yNap4VHzTOJyG+rIkvr8l+6c76Y2iDDJU0q0SSau7/bOQzM2Zjujieo4SE5W7pyb1r NV8WvLaKX0bLoiioHTAjK3JVisuCc/b9jxkBkYzCR5EqoyMXcX+YFV7HqqtsNjFww0ef sX8NK5fFc1WOF/bqlV9PPDOV7uCP7xQGPgSqxS4yO4CD9SzNaYgziD3o3JYHdG3iXurC ey34vvdq1MHxKFNSOHC3UDo+0VC5ImLpyZP/HTS/CKRsbUIWTsU9HOx6CsM5k7f9JubN 5R7IM5j+9+dgGFLnXEfhHD5OUfsz6a0BzXUGiGqv1k8MdHYdjpL+QpLI7FpMnBzoy2iq aRfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=BdiR23R+/j2dV7uvpT7Q8PnBu+gPyLMC54wVFkPvjB8=; b=H3XVb7823UzeSZgQjCitxALD3Q7xmIjVenipnVuROUtG3wwMfLlblIgIslUOQGUUB4 XqE78YPv9ppfKmO0jeGNPC578jcel+93aDpZopSbkU5I8HprBZoLxQ4nYh98FBWjibeO eBtY0u7Pg7esuWgIO4gEoxbqXNw2hmXvPlBjAcrrCKbC9uaQ2hJCDoIGBaO0u6TJwJjm ByRkUd6+ed06dKzn4tHZiyrwnhXIN2hV76+068klbEQUNFThNfe1kt41aE9a0eoF5zRg LujF4SCtsyMHExT/XInHI/DORwELfIJP4VJpcemRovqw2Ia8te/Ltm7Bw1nK9FyLoYzx JsHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6-v6si665534pgv.508.2018.07.17.04.17.09; Tue, 17 Jul 2018 04:17:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731221AbeGQLsS (ORCPT + 99 others); Tue, 17 Jul 2018 07:48:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:36246 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730000AbeGQLsS (ORCPT ); Tue, 17 Jul 2018 07:48:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5376CAED8; Tue, 17 Jul 2018 11:16:09 +0000 (UTC) Date: Tue, 17 Jul 2018 13:16:08 +0200 From: Michal Hocko To: ufo19890607@gmail.com Cc: akpm@linux-foundation.org, rientjes@google.com, kirill.shutemov@linux.intel.com, aarcange@redhat.com, penguin-kernel@i-love.sakura.ne.jp, guro@fb.com, yang.s@alibaba-inc.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, yuzhoujian@didichuxing.com Subject: Re: [PATCH v14 1/2] Reorganize the oom report in dump_header Message-ID: <20180717111608.GC7193@dhcp22.suse.cz> References: <1531825548-27761-1-git-send-email-ufo19890607@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1531825548-27761-1-git-send-email-ufo19890607@gmail.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 17-07-18 19:05:47, ufo19890607@gmail.com wrote: > From: yuzhoujian > > OOM report contains several sections. The first one is the allocation > context that has triggered the OOM. Then we have cpuset context > followed by the stack trace of the OOM path. Followed by the oom > eligible tasks and the information about the chosen oom victim. > > One thing that makes parsing more awkward than necessary is that we do > not have a single and easily parsable line about the oom context. This > patch is reorganizing the oom report to > 1) who invoked oom and what was the allocation request > [ 131.751307] panic invoked oom-killer: gfp_mask=0x6280ca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), order=0, oom_score_adj=0 > > 2) OOM stack trace > [ 131.752399] CPU: 16 PID: 8581 Comm: panic Not tainted 4.18.0-rc5+ #48 > [ 131.753154] Hardware name: Inspur SA5212M4/YZMB-00370-107, BIOS 4.1.10 11/14/2016 > [ 131.753806] Call Trace: > [ 131.754473] dump_stack+0x5a/0x73 > [ 131.755129] dump_header+0x53/0x2dc > [ 131.755775] oom_kill_process+0x228/0x420 > [ 131.756430] ? oom_badness+0x2a/0x130 > [ 131.757063] out_of_memory+0x11a/0x4a0 > [ 131.757710] __alloc_pages_slowpath+0x7cc/0xa1e > [ 131.758392] ? apic_timer_interrupt+0xa/0x20 > [ 131.759040] __alloc_pages_nodemask+0x277/0x290 > [ 131.759710] alloc_pages_vma+0x73/0x180 > [ 131.760388] do_anonymous_page+0xed/0x5a0 > [ 131.761067] __handle_mm_fault+0xbb3/0xe70 > [ 131.761749] handle_mm_fault+0xfa/0x210 > [ 131.762457] __do_page_fault+0x233/0x4c0 > [ 131.763136] do_page_fault+0x32/0x140 > [ 131.763832] ? page_fault+0x8/0x30 > [ 131.764523] page_fault+0x1e/0x30 > > 3) oom context (contrains and the chosen victim). > [ 131.771164] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0-1,task=panic,pid=8608,uid=0 > > An admin can easily get the full oom context at a single line which > makes parsing much easier. > > Signed-off-by: yuzhoujian Acked-by: Michal Hocko Btw. you can usually keep Acked-by for such a small change. If you are not sure just ask off list. > --- > Changes since v13: > - remove the spaces for printing pid and uid. -- Michal Hocko SUSE Labs