From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1F66C2D0D2 for ; Tue, 24 Dec 2019 13:47:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 740D82075E for ; Tue, 24 Dec 2019 13:47:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="a1XflIgS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 740D82075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DF5B48E0005; Tue, 24 Dec 2019 08:47:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D7ED08E0001; Tue, 24 Dec 2019 08:47:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C47908E0005; Tue, 24 Dec 2019 08:47:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0069.hostedemail.com [216.40.44.69]) by kanga.kvack.org (Postfix) with ESMTP id AA9378E0001 for ; Tue, 24 Dec 2019 08:47:19 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 68502180AD811 for ; Tue, 24 Dec 2019 13:47:19 +0000 (UTC) X-FDA: 76300161798.18.plane29_22c3d0983b862 X-HE-Tag: plane29_22c3d0983b862 X-Filterd-Recvd-Size: 4251 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 24 Dec 2019 13:47:18 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id j9so16449376qkk.1 for ; Tue, 24 Dec 2019 05:47:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=gJSU2c7V0b8ZdILNENIi9JaOANjv/UG/dY9rvMfObQ0=; b=a1XflIgSEYNpJvpUhAyvvY/8pqmTpscYLPyOlUzC6qYXGsT/ftktR5ECLrk070j9Zw Qe6KW4fiampfcyY1sdzubGbwR3jBOQ3XqKWA4SHzzAlKVnpibJXXpttbqSVxLW3wU6rm kIlmeHuOexw62UGQESniUTMe2cEa6jZB/DDRR2QuJaJfO+ukdC0uBfc4QGNg9pFJFueo c3NGXtWjcKBjxu+DLtY5rBlhjOFGqozv0V1IqmUc44RSIhOWlRgFo7u08GVro97P8f3A 2FPXjktQebmxkgNmNMHM+qx20hfmZyHYbPGZZiRc3J0lElrF052KAhcVsfwYMURkegtb 8Eeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=gJSU2c7V0b8ZdILNENIi9JaOANjv/UG/dY9rvMfObQ0=; b=AyLLQ2rSiWBjrdG9enbI7sClpclNTFsAIF992kjxvS0ugWJ6o9r9o0Sz/E4LNqvFmB v8Qz2MRW6ih2MAKYy8xrFaxS5m8IfL4WPc1e6z5KCym8e95K/m0ziR8Csj+eGjHmFar8 xOg4iKsPbXfKpuU599B+wKN05yeXdNVkFs0FpDHneMczBZQ5FS9PA/irwLOPpG7hwjO4 kxpD4LdFl7vLiZJG+7HjO/VFiFnhiwcTBolX7tdBPo9cJcyMSwWc92+qu3WtcQ2LsGwb M2cDlF5y0wV/DKeMG0mNSxYjU+4M/NzjK9yL68WUZ1tUxsbwWLRN7Bo7ue5IH4MR1iAw NbZQ== X-Gm-Message-State: APjAAAVt8bTKvqOPRmvimdU/utHcG/uVV1rvnHnCNqkpq/um864KiLrz liHC558boaxzk2aZLzdUR/z6uycP8h8= X-Google-Smtp-Source: APXvYqwIoLmnlGecAq3xrlAoCzXA4v5nuuwvRo44+mVVe8A3lZxILyFHSq9kRU8TkLB5N4Pp4CdLPA== X-Received: by 2002:a37:8085:: with SMTP id b127mr30055985qkd.424.1577195237928; Tue, 24 Dec 2019 05:47:17 -0800 (PST) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id r44sm7586209qta.26.2019.12.24.05.47.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Dec 2019 05:47:17 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] mm/page_owner: print largest memory consumer when OOM panic occurs Date: Tue, 24 Dec 2019 08:47:15 -0500 Message-Id: <5E08DE19-5B71-4245-8908-548BB4FA861F@lca.pw> References: <1577169946.4959.4.camel@mtkswgap22> Cc: Andrew Morton , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com In-Reply-To: <1577169946.4959.4.camel@mtkswgap22> To: Miles Chen X-Mailer: iPhone Mail (17C54) X-Bogosity: Ham, tests=bogofilter, spamicity=0.061198, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > On Dec 24, 2019, at 1:45 AM, Miles Chen wrote: >=20 > We use kmemleak too, but a memory leakage which is caused by > alloc_pages() in a kernel device driver cannot be caught by kmemleak. > We have fought against this kind of real problems for a few years and=20 > find a way to make the debugging easier. >=20 > We currently have information during OOM: process Node, zone, swap,=20 > process (pid, rss, name), slab usage, and the backtrace, order, and > gfp flags of the OOM backtrace.=20 > We can tell many different types of OOM problems by the information > above except the alloc_pages() leakage. >=20 > The patch does work and save a lot of debugging time. > Could we consider the "greatest memory consumer" as another useful=20 > OOM information? This is rather situational considering there are memory leaks here and there= but it is not necessary that straightforward as a single place of greatest c= onsumer. The other question is why the offensive drivers that use alloc_pages() repea= tedly without using any object allocator? Do you have examples of this in dr= ivers that could happen?=