Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp286976imm; Wed, 30 May 2018 23:50:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJuYiXvJLAu0puUYk9fxM7eePjDvxJmQtbNs1NF3vziHfhno8OXX+2hEHdLMPNut+mPt5u6 X-Received: by 2002:a17:902:b786:: with SMTP id e6-v6mr5904511pls.260.1527749434746; Wed, 30 May 2018 23:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527749434; cv=none; d=google.com; s=arc-20160816; b=YEJEhe2ME5oyliIKL51AHkuonkmKxqawLTvmisrnpNtueYwF7pneXy/+QY8OUwB0so rBID35lErKFCrdNgrgdndjZ1VTZCcGwBMhxlOcInznPlHRa1PTjn4oEOYDtLn9fK6xUb 5UuD/nG07CjsZEEQYJnRFwbGnybUlYTCteOw1ZmpshTNCtQl0qormXfxhn2S334WkTQc 0pG2Olu7hUjZk6zcvgm0M8DvPBt3i+hUTjU+LfNpS8imN/jIVwSD/TnPGfJ0Yqc/9tp+ 2OkN3KjixaoTlszMrLW1NdwaXAJRLOtHOXDEB7XYRf/+n8FiiT5LHT8ZINzCOP3rS1XB nA6g== 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=SwqRDkKbIgxmUjY3w/oGSwqOuQ1uPA5nfSFMVHPi5sY=; b=W/BTrIsVN52dlBGF6NJbZGXsYEM1izxBpMOF10Ew1LRLyPNg/YTK0wvDrjaoPfOH5n GKBy02U28lJ124bG1vCYqV7f/OjJNecf4Nd3Ihwoi4BN5Rr5KezXQH5nIXAxRv9/tHEH sVxeCjAEaaU1sZ1t1snr2Ch5GIqWUohuPVe9TD9RXg31T9D8VMftyYLGkTgGLES/RZhy 4CD0qbSc+X26LXQranajGVvBvlUAuHo58EtN3msyqLBsR1Q6oUxyROv+DqYt+LpVSW1Q HGFtQcRRzCBVoK88AvET3GG0hriQbVyNoaNDsV2q10m6bnyTwYiUtd7ZEUVJcEsjijCm /qIQ== 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 d12-v6si9218250pfk.166.2018.05.30.23.50.20; Wed, 30 May 2018 23:50:34 -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 S1753943AbeEaGtz (ORCPT + 99 others); Thu, 31 May 2018 02:49:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:50816 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753825AbeEaGty (ORCPT ); Thu, 31 May 2018 02:49:54 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 45A09AEB5; Thu, 31 May 2018 06:49:53 +0000 (UTC) Date: Thu, 31 May 2018 08:49:51 +0200 From: Michal Hocko To: Andrew Morton Cc: ufo19890607 , 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 Subject: Re: [PATCH v4] Print the memcg's name when system-wide OOM happened Message-ID: <20180531064951.GG15278@dhcp22.suse.cz> References: <1526870386-2439-1-git-send-email-ufo19890607@gmail.com> <20180530134256.bbf7a8639571a3f8910b6a05@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180530134256.bbf7a8639571a3f8910b6a05@linux-foundation.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 30-05-18 13:42:56, Andrew Morton wrote: > On Mon, 21 May 2018 03:39:46 +0100 ufo19890607 wrote: > > > From: yuzhoujian > > > > The dump_header does not print the memcg's name when the system > > oom happened. So users cannot locate the certain container which > > contains the task that has been killed by the oom killer. > > > > System oom report will print the memcg's name after this patch, > > so users can get the memcg's path from the oom report and check > > the certain container more quickly. > > lkp-robot is reporting an oops. > > > --- a/mm/oom_kill.c > > +++ b/mm/oom_kill.c > > @@ -433,6 +433,7 @@ static void dump_header(struct oom_control *oc, struct task_struct *p) > > if (is_memcg_oom(oc)) > > mem_cgroup_print_oom_info(oc->memcg, p); > > else { > > + mem_cgroup_print_oom_memcg_name(oc->memcg, p); > > show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask); > > if (is_dump_unreclaim_slabs()) > > dump_unreclaimable_slab(); > > static inline bool is_memcg_oom(struct oom_control *oc) > { > return oc->memcg != NULL; > } > > So in the mem_cgroup_print_oom_memcg_name() call which this patch adds, > oc->memcg is known to be NULL. How can this possibly work? This version is broken. The current version [1] seems to be doing the right thing in that regards AFAICS. It has some other issues though. Can we drop the current code from the mmotm tree and start over? [1] http://lkml.kernel.org/r/1527413551-5982-1-git-send-email-ufo19890607@gmail.com -- Michal Hocko SUSE Labs