From patchwork Thu May 17 07:00:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?56a56Iif6ZSu?= X-Patchwork-Id: 10405629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0445360230 for ; Thu, 17 May 2018 07:00:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E61EB286E6 for ; Thu, 17 May 2018 07:00:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA53728950; Thu, 17 May 2018 07:00:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF40B286E6 for ; Thu, 17 May 2018 07:00:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 584256B0396; Thu, 17 May 2018 03:00:40 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 533266B0398; Thu, 17 May 2018 03:00:40 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 424216B0399; Thu, 17 May 2018 03:00:40 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 042756B0396 for ; Thu, 17 May 2018 03:00:40 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id w7-v6so2187009pfd.9 for ; Thu, 17 May 2018 00:00:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id; bh=B5Dyfn7iKeqj9udmnNXZwm6nhiZfUZVWNaFuc6P09AA=; b=Krjc7/I9UXkMGyULrXm1jCETSEW4LtRrbD64j4asXvKhv8zS0PLTDJ4bZdFggTo0hM 76sWeGFMrzs8NWZmTPUXTo5ysTlKpOhVbaDW4bG2C4K/OGRp5UplUYP/TKPJiFW7zk2L eYMhJbUIYN8lJ+4CXzbdD+EfNwrpbvktQD25XGITiaGa5bdVFSUXmW1Nwhdcof4xsGTn 3NlLDi8Bx30r4nDupGkIZ2OKVQ2X0NzawRwljcpihVQI1xyHeq3s/s1csNlydFhealgO Bb71syf+2qi9/reEQBLh9V7eUIHxR33ntQWAu4PMfjycxlljcJ6kfbB3bXRec038Zgl4 4I2Q== X-Gm-Message-State: ALKqPweUwJpwrtTG0HXBGX9SasyfOZ2bhRQyTWXShKYGeavpTRVu4a9r 1ioEKIrPGedKvy9/yn/tcFwwBHn6f0MbXwy+CLrlUfgmW0TLuwLoTOJ0Oy8zAeCZcZD/H96IxK9 RJD539+kY09X6WocORsWZun0QJ7gfjWVQ6yT/a01POcaNjBXm2crmugV8S5q18+0qRBBY8ko58N o4tsX18KsL/AVcYLW6mO03RiPDhbSdPGTC7714YeF+5aMBp+QJgzHszq1DhE5FhCtO3tcjiPd5U EdgWt4OBHSm2dZZDMaPFTR/fs2Otwp0GhaydDchMOGJW49GAp4pID9jm8kKh5V2BrsHxrttZ9F+ KGPd1v7cxZDryYlkx4fNi1K54WpN85q/Kn7oMMMj18hLLHYASNsfdBjlzBLWF3EPeAeLh+1WkHD s X-Received: by 2002:a63:9d0d:: with SMTP id i13-v6mr3149187pgd.288.1526540439696; Thu, 17 May 2018 00:00:39 -0700 (PDT) X-Received: by 2002:a63:9d0d:: with SMTP id i13-v6mr3149158pgd.288.1526540439017; Thu, 17 May 2018 00:00:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526540438; cv=none; d=google.com; s=arc-20160816; b=CntGo8BL1Ya/MZzd0pkF5dWO3m0PWrUcQ4cVjHLl2ER08Ev3S3lDR9iqzUWYLgwrXR 2h5D2VMw5/IvJ7/iFCshdQ0PJMv++8foC3dH4fKjGqLA0NQVRbDHWLWyCi77MF1RiRKM ibm2QPrHhBdiecHposEYMS7MrOHAtjlsy4I8HH16aE5Udd3Pd4roEMVXlaHaTBdnjRoI 3zgji9tTC6bwfX0MggT/LkHSfQc2t6o6ACKx6v170oPRLzQoM2ECmfv0FSj/NlQPAVOL mBhNSdxTnmF348Odow69YeojNSFSHana4+ADOTsN+KXeb40saMNeQMcmy/ZVnna5+/X3 I+bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=B5Dyfn7iKeqj9udmnNXZwm6nhiZfUZVWNaFuc6P09AA=; b=yeaVx6mSOlfsKpEmQp1NbTDFdCJwVMrIjpuzLkSLyJUjHLKftwGTvdeZRVfn0mk/ux 2aiOrTylB1gwjVnlLnV2Ta7FV1RcBuPH2P6ljB6ZDcTi+j4lBCgpSF3Znvc/5SMh266p 4KIWYGp0IJOEAXbTRaxYDVkG05KTffhQB6gHj3ZvcaKqjubOUg/PPu931G9zdRtyCDjC XiE6FXiP3NMTMn3bRC0Owxxnuve7xFYFprkcfQtKbpOYcr5m5T7lNFYYYT3yfdcIidMA fFsL0KsVoOONIqBOnFgQTlj3bx3M/OUPRZn3ndSyo0V203XAeWPiKen4Vbz3fCp/SR6+ ywRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lqDiWceh; spf=pass (google.com: domain of ufo19890607@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=ufo19890607@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b2-v6sor2554227plz.151.2018.05.17.00.00.38 for (Google Transport Security); Thu, 17 May 2018 00:00:38 -0700 (PDT) Received-SPF: pass (google.com: domain of ufo19890607@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lqDiWceh; spf=pass (google.com: domain of ufo19890607@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=ufo19890607@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=B5Dyfn7iKeqj9udmnNXZwm6nhiZfUZVWNaFuc6P09AA=; b=lqDiWceh0TsYahusfvEK9SYqpxjnPwYLZqtoSL2R86I7ws4zVTN8xHVeFyMS1NXVcp ZOtBYmzPYPj+fshgzG7ZmkRt3WIsK9fRculvTbrDq41o1zXWMcDwxGGsRsybj3yv7LUd TNGNjZY41JWGm7ebYXGJZVL8y053VvCwVYEBmZSgDQSoFTwdzmBzeBU/qRv/V09PfPee Crs31DPBMYs5qiLaBVMBttO+oKcIV+zu7pfBRVhR4IzB8nT2gGnYBxzQ1rrPOZnRIlII 4+BBOkTduR8me0V/ZUYdTsdfYM0aRief7pjIa4QyDucGvsdmzdQsLZMYqU4LGk2ch3e3 YvAQ== X-Google-Smtp-Source: AB8JxZqyxkzGVOu5KfeChioybrUn5ARuVZwzRy42qk7O7L8/6kBiOYai7P2GX9pkRq9VF+AWSyzu0Q== X-Received: by 2002:a17:902:710f:: with SMTP id a15-v6mr4153559pll.171.1526540438736; Thu, 17 May 2018 00:00:38 -0700 (PDT) Received: from node5.localdomain ([52.229.160.192]) by smtp.gmail.com with ESMTPSA id e18-v6sm6312520pfi.100.2018.05.17.00.00.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 00:00:37 -0700 (PDT) From: ufo19890607 To: akpm@linux-foundation.org, mhocko@suse.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 Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, yuzhoujian Subject: [PATCH] Add the memcg print oom info for system oom Date: Thu, 17 May 2018 08:00:28 +0100 Message-Id: <1526540428-12178-1-git-send-email-ufo19890607@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: yuzhoujian The dump_header does not print the memcg's name when the system oom happened. Some users want to locate the certain container which contains the task that has been killed by the oom killer. So I add the mem_cgroup_print_oom_info when system oom events happened. Signed-off-by: yuzhoujian --- mm/oom_kill.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 8ba6cb88cf58..244416c9834a 100644 --- 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_info(mem_cgroup_from_task(p), p); show_mem(SHOW_MEM_FILTER_NODES, oc->nodemask); if (is_dump_unreclaim_slabs()) dump_unreclaimable_slab();