Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp34541imm; Thu, 28 Jun 2018 13:22:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKi1yEH910NHWuqwVzmAmh2Wc+liNA0OKUVgO8OhL9L+A8DDZAb56YVC5Ig4NMPeakfTtqp X-Received: by 2002:a63:2404:: with SMTP id k4-v6mr10002871pgk.191.1530217339325; Thu, 28 Jun 2018 13:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530217339; cv=none; d=google.com; s=arc-20160816; b=sYvoLbbpZrenjXEID87nHHxLmXEhTAJDwfejA4pmfQonOqCShVyyelVQyhxL8Tu3ez YxgqaLz9ZMnPbA+vx6YK9jzeukgssjhPwjNFBg8zXL2tiWsc+bQchAcP+UEUNUHENcB0 hVUXgS+dXs/W9u04XdTJ7nz4GWy/vRbwI5vGNiE5I8u0I8x7lquDd2QrkRTXWVJroRC2 Piv/6nG6/zpaoe3fLt/7sYT8Xrn3bKKBVlZaB5Gmokj36hSEqhACRFA9pd/ohAiKbXwF DFUfbC/PF0qzo3T3W5rKSwC+jQY3xNHogXekmJKcqlm42o1uZU99mnAETgOPKhsVTcyz zmLg== 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=FACdeTyntWxUwH33Cv0rEOdNHT4FWJDnPZId5HMihM4=; b=YRGAAcBmC7nZ/17KI9B0RPJhoAvWPYiHUgB4fSmZgDE+6Qjp7SjHxejyNmUy/Ud5ag SaZeh7o8+rspwRumsA8DEsXanqmzvGaUXV/JThRC51OOGnzOBRRdCwyM8mmEqT0Wmrrx hnR1CtcaGrMp82uZ+1agV/ajcuUjyZfnqYnL+LhLLz5FMqdXn9YK0mg6J757S4Eu4AeO hZIohgupW/yxppUqBVeTG+OpKPEflZzM39ygm+NNwlB9PjlENi3TlYSuywl9x14B4iLa MUcRziIbTRTWmhFfdzYFUduRkbg7NM3ZGg79M1B0cG59/7vgGhZ36fsCUuGlA7RumXYo DqRQ== 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 k30-v6si6806355pgn.258.2018.06.28.13.22.05; Thu, 28 Jun 2018 13:22:19 -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 S1030619AbeF1TD5 (ORCPT + 99 others); Thu, 28 Jun 2018 15:03:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:40604 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S968041AbeF1TDz (ORCPT ); Thu, 28 Jun 2018 15:03:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DDF2BAD65; Thu, 28 Jun 2018 19:03:51 +0000 (UTC) Date: Thu, 28 Jun 2018 12:30:02 +0200 From: Michal Hocko To: Andrew Morton Cc: ufo19890607@gmail.com, 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 v10 2/2] Refactor part of the oom report in dump_header Message-ID: <20180628103002.GZ32348@dhcp22.suse.cz> References: <1529763171-29240-1-git-send-email-ufo19890607@gmail.com> <1529763171-29240-2-git-send-email-ufo19890607@gmail.com> <20180627191041.509893a3b43f95a27df32266@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180627191041.509893a3b43f95a27df32266@linux-foundation.org> 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 Wed 27-06-18 19:10:41, Andrew Morton wrote: > On Sat, 23 Jun 2018 22:12:51 +0800 ufo19890607@gmail.com wrote: > > > From: yuzhoujian > > > > The current system wide oom report prints information about the victim > > and the allocation context and restrictions. It, however, doesn't > > provide any information about memory cgroup the victim belongs to. This > > information can be interesting for container users because they can find > > the victim's container much more easily. > > > > I follow the advices of David Rientjes and Michal Hocko, and refactor > > part of the oom report. After this patch, users can get the memcg's > > path from the oom report and check the certain container more quickly. > > > > The oom print info after this patch: > > oom-kill:constraint=,nodemask=,oom_memcg=,task_memcg=,task=,pid=,uid= > > > > Signed-off-by: yuzhoujian > > --- > > Below is the part of the oom report in the dmesg > > ... > > [ 134.873392] panic invoked oom-killer: gfp_mask=0x6280ca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), nodemask=(null), order=0, oom_score_adj=0 > > > > ... > > > > [ 134.873480] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),task_memcg=/test/test1/test2,task=panic,pid= 8669, uid= 0 > > We're displaying nodemask twice there. Avoidable? > > Also, the spaces after pid= and uid= don't seem useful. Why not use > plain old %d? I've been discussing this with yuzhoujian off-list so please drop the current pile -- Michal Hocko SUSE Labs