Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4877193imm; Wed, 30 May 2018 13:57:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ0dTWgh6Jx943R+/Y21/qNvGK4kUYsl29RrFCy5eTtvq6Q6AAAZxexbBlpQW/V1BPUFEme X-Received: by 2002:a17:902:ab8b:: with SMTP id f11-v6mr4188307plr.372.1527713856204; Wed, 30 May 2018 13:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527713856; cv=none; d=google.com; s=arc-20160816; b=tA6MI/0GrZMyN+N7Nx1Q/gOYIyerUbzYsuHBsdPwCGF9U4Fm7iybWcNBRZvJbGAhTo sKdE/MUqjSziOJqp/wCgPq5spesP34s6feF7+hADe1gVScwAzpVe8w1lex5cxK/O/wju dVJRUNWMtniIsxQFEdNBvcw4C8FMunUbIOvgcwAOXiVsme5lcJPfzQDPgHriS6kY+QDK OndYFKgEh7aiEYBMbc47vPfRx4pitCZMhn+JpNzswe5WNKC5Am6uGZPB4cOxupOB8slc elHR7egQ+BuzBPDN2pCQ2dVSKnQ9oSW8KIOXH3g51JkyMrxrbOE9KSBGO0JkaUlP+oU6 AHXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=9vS6MJE9lH5nSl9gILxwD86WEhgOaDoPbeb7g9ymRP4=; b=QA/vVsDj8VOAxU97u3glCFtuk/aEclVXJuO3EWModYeWqPDfei8X89VpNLPRy/X1e1 X1Ui7m1DIiHkBN465eTVazyxdjLsg5fal6StMMTB5k3XuuSb++pl8OF9XjMvCEecQYTL xqozCIKAYzYQBO++skdTfDBe2ogXG1uYXx2l3w7EZ/BXiva+lUl6N/jMRYBDfjLcO37v 4BRCUo/yokydwbWVjjpOh17oyBXDzOhcqq2ki/wJ1tudmT5YO44jtvn1Nv4PllcTnhzh 4ANyDNUzMNJdhRkzgh8zsINuOkSfeXIa90SnRSnFKiW5B0ihBGGlExeW4Du+3m9Houtw cYzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pP+m1tdZ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si34400037pld.152.2018.05.30.13.57.22; Wed, 30 May 2018 13:57:36 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=pP+m1tdZ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932512AbeE3U4v (ORCPT + 99 others); Wed, 30 May 2018 16:56:51 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:44827 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932340AbeE3U4n (ORCPT ); Wed, 30 May 2018 16:56:43 -0400 Received: by mail-pl0-f68.google.com with SMTP id z9-v6so8467584plk.11 for ; Wed, 30 May 2018 13:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=9vS6MJE9lH5nSl9gILxwD86WEhgOaDoPbeb7g9ymRP4=; b=pP+m1tdZA8j7Wb3Iboe4BmhipGm+6/3rrLB2/raUeBWNKIWIquGSiJfu8cqIhTtGYw 6uR2kyWO+gg4VSgl7fEUq94TykbU+XgNEUDcoj55n6YSOD///4jMRB1X5uPt/SU0anBb eP3u9tMVBYEGZHIU2SM49ArLTfTcn84oXf0cHM/IzDJYUWZuq5GIQ6xPuImWl7NKDI9V KMN0dL3a64FfM7AgiWZH2EB/ppGNfasCnXYRjmH8kNGrxc+iORxfam2GDQw4yW2XQAC4 0bPrxjOLbmcuAiUpkP+y4/bfc6kc8dYU377M0BWP2qbGxrxn1yRLeJ6z9attUaXPUgWu WeWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=9vS6MJE9lH5nSl9gILxwD86WEhgOaDoPbeb7g9ymRP4=; b=iR7S5BdDXOxCN9165e8VSpjFQK1gTX2kGeEN+bCM3uVKLXrGKHlY9rs8kUigailtIW h0ApoPeqyMzSi7gyveu7u4j21MDuY8MbMgIiG2PZ5XVZchE6xKe9imB7eQhhUNfiGkdd HEfddkwcRsjseXs4b+fEQzAr+GnkgjndTIGsafSQvith8Xvo0qU0006Yh91P7sm+rLDx 5Vp9yPC41dUoi+9OhZZDm1RJKWMY/RnV84vgCjJYiZhXJt3xeVPwKERv2lHt+YGpHlxq kRCEcynRKttD3ptLgI2eJ9k+UMdL4/117AyzUSplunqcs7MFUqlkqThQCZVoynGFUP0z K0GQ== X-Gm-Message-State: ALKqPwey1BCfH1hTRIQa1XLKyyIH6AEwY8ZP1ZqQ5qDSVCQEMiHegzpV 8c9v+DdS7oEcgUEa5Lir0t6qjg== X-Received: by 2002:a17:902:42c3:: with SMTP id h61-v6mr4281359pld.164.1527713803238; Wed, 30 May 2018 13:56:43 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id q24-v6sm4201433pfh.26.2018.05.30.13.56.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 13:56:42 -0700 (PDT) Date: Wed, 30 May 2018 13:56:41 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: ufo19890607 , akpm@linux-foundation.org, 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 Subject: Re: [PATCH v6] Refactor part of the oom report in dump_header In-Reply-To: <20180528141000.GG27180@dhcp22.suse.cz> Message-ID: References: <1527413551-5982-1-git-send-email-ufo19890607@gmail.com> <20180528141000.GG27180@dhcp22.suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 May 2018, Michal Hocko wrote: > > Below is the part of the oom report in the dmesg > > ... > > [ 142.158316] panic cpuset=/ mems_allowed=0-1 > > [ 142.158983] CPU: 15 PID: 8682 Comm: panic Not tainted 4.17.0-rc6+ #13 > > [ 142.159659] Hardware name: Inspur SA5212M4/YZMB-00370-107, BIOS 4.1.10 11/14/2016 > > [ 142.160342] Call Trace: > > [ 142.161037] dump_stack+0x78/0xb3 > > [ 142.161734] dump_header+0x7d/0x334 > > [ 142.162433] oom_kill_process+0x228/0x490 > > [ 142.163126] ? oom_badness+0x2a/0x130 > > [ 142.163821] out_of_memory+0xf0/0x280 > > [ 142.164532] __alloc_pages_slowpath+0x711/0xa07 > > [ 142.165241] __alloc_pages_nodemask+0x23f/0x260 > > [ 142.165947] alloc_pages_vma+0x73/0x180 > > [ 142.166665] do_anonymous_page+0xed/0x4e0 > > [ 142.167388] __handle_mm_fault+0xbd2/0xe00 > > [ 142.168114] handle_mm_fault+0x116/0x250 > > [ 142.168841] __do_page_fault+0x233/0x4d0 > > [ 142.169567] do_page_fault+0x32/0x130 > > [ 142.170303] ? page_fault+0x8/0x30 > > [ 142.171036] page_fault+0x1e/0x30 > > [ 142.171764] RIP: 0033:0x7f403000a860 > > [ 142.172517] RSP: 002b:00007ffc9f745c28 EFLAGS: 00010206 > > [ 142.173268] RAX: 00007f3f6fd7d000 RBX: 0000000000000000 RCX: 00007f3f7f5cd000 > > [ 142.174040] RDX: 00007f3fafd7d000 RSI: 0000000000000000 RDI: 00007f3f6fd7d000 > > [ 142.174806] RBP: 00007ffc9f745c50 R08: ffffffffffffffff R09: 0000000000000000 > > [ 142.175623] R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000400490 > > [ 142.176542] R13: 00007ffc9f745d30 R14: 0000000000000000 R15: 0000000000000000 > > [ 142.177709] oom-kill: constrain=CONSTRAINT_NONE nodemask=(null) origin_memcg= kill_memcg=/test/test1/test2 task=panic pid= 8622 uid= 0 > > Is it really helpful to dump the nodemask here again? We already have it > as a part of the "%s invoked oom-killer:" message. > At the risk of making the patch more complex, it would be possible to suppress nodemask= for constraints that are not CONSTRAINT_MEMORY_POLICY, but the goal was to provide a single line output that userspace can parse for all information and not rely on surrounding lines to match oom kills with invocations (the invocation itself may have been lost from the ring buffer), and we want this to not be subjected to any ratelimit. We need to eliminate the spurious spaces in the output, though, and fix the spelling of "constrain". There should be no spaces between pid and uid values.