Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6292430ybl; Mon, 23 Dec 2019 03:35:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyzxgGTbh3H2nQArtyFK3/9ZKntaHvhq5Bc5zTM4z8AzpxBt8GMnpJ7uF5v7KCoCSZ1n45l X-Received: by 2002:a05:6830:12da:: with SMTP id a26mr11687227otq.223.1577100923167; Mon, 23 Dec 2019 03:35:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577100923; cv=none; d=google.com; s=arc-20160816; b=SO4cQAqCge9gh+6Y61ZKhoqO3+rdVS+eddKESoXW5e8CzJLlwz6Q6oc3hWuv4fcTpp XgGVp6MGR8lbTFVlFwOIHzEesMXJf32m7BCBOTcMLiiVQeBKF/mhnWXsIBHtDXCIKMRk wf/V44Barnh8pGBdQGVJeYNe8ni4LW5DS5HJzZRdTbcMEOURTQp72LQKitNQINbHWOZR WhkIxD47iF41fsXAglOeseRKlRbQ4+Ptr2/5o+GfwdVdGi8nDURl8ZEmnDKbA4wwUwt2 eUf1cdXjwhcVi5ikNAFC2VQjwEGvsfFCxYpAulVjlA1BbO0ESP1uHheT1NQTw1GwOibK Yd5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qX14vySNe6dWHS9CVDjOljRuxmLr34hwjucjAyQrc40=; b=qwH7T+i3aamLDFeflUstsUvoD04XglQ2bTY+7pbd8HKcIqxBsHRFWZRNHwQoVOw6Qq FAAgZFpC0eODlcOnndOl3JQPhBKjo+Lv07+pbFrJwHukPdbJOo4bHHnW8Fjws3S71CuL /ImYDr8eZ3h6h8a14nXv3VjyUsxlykJ/NBjQ1IzJsUTRg+b7JKoolwiihbecs8FZpHWT 0HZ4dHZFDrGxd3eV8VNZGefT9OPUW0lwuwKkLukSkGt/r2pMXLKLG+StWVGYT+y959wT 3IrMPatyOEU2jOFxtG/285XU7NszogD1lDKwza8GXFvIgntQJhQetfxvtf2z8Ge3WDT0 hNMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hjqqHWuj; 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=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si10585018oto.36.2019.12.23.03.35.11; Mon, 23 Dec 2019 03:35:23 -0800 (PST) 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=@mediatek.com header.s=dk header.b=hjqqHWuj; 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=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726829AbfLWLdl (ORCPT + 99 others); Mon, 23 Dec 2019 06:33:41 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:63952 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726666AbfLWLdl (ORCPT ); Mon, 23 Dec 2019 06:33:41 -0500 X-UUID: ff6927678b874ed6bc52e90e70d90812-20191223 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=qX14vySNe6dWHS9CVDjOljRuxmLr34hwjucjAyQrc40=; b=hjqqHWujsKPp7M8G3XBepzWUuos1NXZO7NRHReI4zK9WxsB0H96Tdw1RN3Gdf3uxTi/KCiM4UTstKJ7K/MifEvdv74G7Scu7htGYhonscSWa33NWPVbWzLL7YmfSmKOpCBBFu9s55Ebebv1+Uxxc9I2Hg2msUn+kv+g99bAi+C0=; X-UUID: ff6927678b874ed6bc52e90e70d90812-20191223 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 13804429; Mon, 23 Dec 2019 19:33:30 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 23 Dec 2019 19:33:27 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 23 Dec 2019 19:32:33 +0800 From: Miles Chen To: Andrew Morton CC: Michal Hocko , , , , , Miles Chen Subject: [PATCH] mm/page_owner: print largest memory consumer when OOM panic occurs Date: Mon, 23 Dec 2019 19:33:26 +0800 Message-ID: <20191223113326.13828-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 9B750EF3048915A1305E13950C7313796853CA057EF394FBE0BAF085AE76E0202000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TW90aXZhdGlvbjoNCi0tLS0tLS0tLS0tDQoNCldoZW4gZGVidWcgd2l0aCBhIE9PTSBrZXJuZWwg cGFuaWMsIGl0IGlzIGRpZmZpY3VsdCB0byBrbm93IHRoZQ0KbWVtb3J5IGFsbG9jYXRlZCBieSBr ZXJuZWwgZHJpdmVycyBvZiB2bWFsbG9jKCkgYnkgY2hlY2tpbmcgdGhlDQpNZW0tSW5mbyBvciBO b2RlL1pvb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