Received: by 10.213.65.68 with SMTP id h4csp66652imn; Wed, 21 Mar 2018 12:31:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELskZY0y0/xlCCgx0PMJisWKz/D26LhGDmxHCiPmuUaT0wS+TYeq27WV1Qc086SHbOQUWlNU X-Received: by 10.99.173.7 with SMTP id g7mr835437pgf.170.1521660676805; Wed, 21 Mar 2018 12:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521660676; cv=none; d=google.com; s=arc-20160816; b=jDZnXg34pSW2DTMyv9T6YRKfzrFP7u2CMSdoS6H114Pbgan3zKjOBA9A7AW0YmmrRe WUAcBjKruroPKZGi7G1ZqETPW8ThLFwgX9/YjWr7llG1VpZli5WlYWcj6ukiaj/pr1X6 VNEO+w+r0Q6NxDTqs0Vamd2OW228cm2AqNG9rMWUx8l9Yz3bBTlB0NexIhS1IoqozzRM /OXP6HK88zv0ALVOgg1vTC7xnm83jx3GwontSzz2/G9wWLqEiD/r9pVls18haAndN8mW S/alrq6tm6WBRRNPxfaXfruXrAtc2E/bFvXLu5j7fv+Wmhi9cGtdow5iGeif0ieSpyxP 3G6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=w+1aI0bA/hOUVGRh8hRyZ1h6KbXJxhu7xChO1vpC6i8=; b=RoB+SRGOm1rBmQgkfmiHxXz0BEbu0/jzgG5B+iz1xPSistPf85y0ClLKJwVbM9X6ST BOMXkshXk5QNgUSB028YDcKNtSw5KWvsUECRO3J8CEFMb46pB6aDtiMKTBX5LN31K5cN xn5eFUSVXrelTUPzstKvjbYErlX7AeOdcoFlgEMCgMSbDk8xJoDML6NSMiyy00L3OYsO k2QBWBIYG0PAit9TPeDVe12/JGJotakz5eglQOMR+mSf1JTmGEOHhfunixVavyLfoPNm wjr9RFoQnK3eedNNwAndFmY2MGi7FqSF0zI3BcPwufcs+p7FfEQVFODd18komddDyMJ0 c9hQ== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si3192858pgc.551.2018.03.21.12.31.01; Wed, 21 Mar 2018 12:31:16 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753444AbeCUTYl (ORCPT + 99 others); Wed, 21 Mar 2018 15:24:41 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54864 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753424AbeCUTYc (ORCPT ); Wed, 21 Mar 2018 15:24:32 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2LJM9x9133456 for ; Wed, 21 Mar 2018 15:24:31 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2guvm8ahfj-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 21 Mar 2018 15:24:31 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Mar 2018 19:24:28 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 21 Mar 2018 19:24:22 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2LJOMaO48758888; Wed, 21 Mar 2018 19:24:22 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 84708AE051; Wed, 21 Mar 2018 19:14:41 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 994F7AE045; Wed, 21 Mar 2018 19:14:38 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.206.27]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 21 Mar 2018 19:14:38 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Wed, 21 Mar 2018 21:24:18 +0200 From: Mike Rapoport To: Jonathan Corbet Cc: Andrey Ryabinin , Richard Henderson , Ivan Kokshaysky , Matt Turner , Tony Luck , Fenghua Yu , Ralf Baechle , James Hogan , Michael Ellerman , Alexander Viro , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kasan-dev@googlegroups.com, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Mike Rapoport Subject: [PATCH 19/32] docs/vm: page_owner: convert to ReST format Date: Wed, 21 Mar 2018 21:22:35 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521660168-14372-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1521660168-14372-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18032119-0020-0000-0000-00000407E614 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18032119-0021-0000-0000-0000429C06C4 Message-Id: <1521660168-14372-20-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-21_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803210221 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Mike Rapoport --- Documentation/vm/page_owner.txt | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/Documentation/vm/page_owner.txt b/Documentation/vm/page_owner.txt index ffff143..0ed5ab8 100644 --- a/Documentation/vm/page_owner.txt +++ b/Documentation/vm/page_owner.txt @@ -1,7 +1,11 @@ +.. _page_owner: + +================================================== page owner: Tracking about who allocated each page ------------------------------------------------------------ +================================================== -* Introduction +Introduction +============ page owner is for the tracking about who allocated each page. It can be used to debug memory leak or to find a memory hogger. @@ -34,13 +38,15 @@ not affect to allocation performance, especially if the static keys jump label patching functionality is available. Following is the kernel's code size change due to this facility. -- Without page owner +- Without page owner:: + text data bss dec hex filename - 40662 1493 644 42799 a72f mm/page_alloc.o + 40662 1493 644 42799 a72f mm/page_alloc.o + +- With page owner:: -- With page owner text data bss dec hex filename - 40892 1493 644 43029 a815 mm/page_alloc.o + 40892 1493 644 43029 a815 mm/page_alloc.o 1427 24 8 1459 5b3 mm/page_ext.o 2722 50 0 2772 ad4 mm/page_owner.o @@ -62,21 +68,23 @@ are catched and marked, although they are mostly allocated from struct page extension feature. Anyway, after that, no page is left in un-tracking state. -* Usage +Usage +===== + +1) Build user-space helper:: -1) Build user-space helper cd tools/vm make page_owner_sort -2) Enable page owner - Add "page_owner=on" to boot cmdline. +2) Enable page owner: add "page_owner=on" to boot cmdline. 3) Do the job what you want to debug -4) Analyze information from page owner +4) Analyze information from page owner:: + cat /sys/kernel/debug/page_owner > page_owner_full.txt grep -v ^PFN page_owner_full.txt > page_owner.txt ./page_owner_sort page_owner.txt sorted_page_owner.txt - See the result about who allocated each page - in the sorted_page_owner.txt. + See the result about who allocated each page + in the ``sorted_page_owner.txt``. -- 2.7.4