Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1239211img; Tue, 19 Mar 2019 03:31:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+Ys/z0rVbrUexlvBLqKljJRi84UiF78C+wpYsKFg4giVX+rbRMdqdcApSoI7JNaT6qvL7 X-Received: by 2002:a17:902:ba8c:: with SMTP id k12mr25166306pls.193.1552991493218; Tue, 19 Mar 2019 03:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552991493; cv=none; d=google.com; s=arc-20160816; b=VZ91YoSJY+p2GNyV9+76IKj4WN1XllVmq8gzSA4vUTYUMXXFoDgjNaEJG5w0OJWMZF AfC1uF1ERGAQbBNtfyfyxisJfBgdVxD3h6CpUek1vAyErAgZLf7Lj3zE2EIKI4krAKrt j38Fwnp86pbtPWkWTC+GQCt4Ot6RIXYcbZBtIPaVJ6QhK7qmJSEyiWIoxh+CEcNXvfHo B+uyw6rK6xc0RZQEsmgJk36u1UaXs2c44dtvx2zEZXYFKnwUXVLOVwp4DYb1WzlvLY9V jDx89VZ5asgUO4CZ0Zgj82zHA0vpjY9iE0z0OXEof/lp6SFG6Vgrf5fqSLfNMT04OV8e eg2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=jQl7/78edH7yLD5G0CT1U9U8IhbAPTO5XuOLXV5a4WE=; b=EY4VSyhgm35DvjciquzpIq6e93hCnQ13s5XHHEPeR5P31g5g7Ofvi7VO6B1+jAxgcD rsnUzP067vl/Bv7HieBLS99Fk34DYuvrfXFyNNx8pKwWwOb6aTBiOi9rs2WC+nrq8B4H O4mlHXPnPrSGAKcmYHhQrpprVc7iJZXIOIPKcGYGRR13fCyBasnfTLreia4jIlRTctkY dQ7x3XYY91yYnZV1j7sffklspPDWaHxzBjxvt9H8/24nMdrYXfBNZq8m/gmGAOytoYo+ 0QJwzksLgJzNa7d/OCSTgtCKnjAwxwQNHs7WGMvZTuxlfpdIERNsD0owCGt0vi6x3BKZ 0x+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@eInfochipsIndia.onmicrosoft.com header.s=selector1-einfochips-com header.b=oRVwzzyk; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 189si11092878pgb.412.2019.03.19.03.31.17; Tue, 19 Mar 2019 03:31:33 -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=@eInfochipsIndia.onmicrosoft.com header.s=selector1-einfochips-com header.b=oRVwzzyk; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727113AbfCSKaB (ORCPT + 99 others); Tue, 19 Mar 2019 06:30:01 -0400 Received: from mail-eopbgr1310085.outbound.protection.outlook.com ([40.107.131.85]:18144 "EHLO APC01-SG2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725862AbfCSKaB (ORCPT ); Tue, 19 Mar 2019 06:30:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eInfochipsIndia.onmicrosoft.com; s=selector1-einfochips-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jQl7/78edH7yLD5G0CT1U9U8IhbAPTO5XuOLXV5a4WE=; b=oRVwzzykwxT02ZsOGtzXqR0BACDolHMLukHDd11hTox2Q6GDFddvIwWKUB4zb81IsqEAFo9sfqZ2No5BzzY6S9928ktJPPCq2VtJAta0PWuNC3H1HIcNb2xWj0lpjC2pPn4004cXAoJJiH+AbYjZbC/m5YOKVp1wVOj1c+WcTFk= Received: from SG2PR02MB3098.apcprd02.prod.outlook.com (20.177.88.78) by SG2PR02MB2527.apcprd02.prod.outlook.com (10.170.141.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Tue, 19 Mar 2019 10:29:55 +0000 Received: from SG2PR02MB3098.apcprd02.prod.outlook.com ([fe80::f432:20e4:2d22:e60b]) by SG2PR02MB3098.apcprd02.prod.outlook.com ([fe80::f432:20e4:2d22:e60b%4]) with mapi id 15.20.1709.015; Tue, 19 Mar 2019 10:29:55 +0000 From: Pankaj Suryawanshi To: Michal Hocko CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "minchan@kernel.org" , Kirill Tkhai Subject: Re: [External] Re: mm/cma.c: High latency for cma allocation Thread-Topic: [External] Re: mm/cma.c: High latency for cma allocation Thread-Index: AQHU3YpG7XMhet9mv0+1ZFJR3Y1R16YRXCGAgAACGm2AAAebAIAABP0wgAAIBgCAAU6K1g== Date: Tue, 19 Mar 2019 10:29:55 +0000 Message-ID: References: <20190318130757.GG8924@dhcp22.suse.cz> <20190318134242.GI8924@dhcp22.suse.cz> ,<20190318142916.GK8924@dhcp22.suse.cz> In-Reply-To: <20190318142916.GK8924@dhcp22.suse.cz> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=pankaj.suryawanshi@einfochips.com; x-originating-ip: [14.98.130.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 12e0e1bc-2895-425b-f9ae-08d6ac55d47e x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:SG2PR02MB2527; x-ms-traffictypediagnostic: SG2PR02MB2527:|SG2PR02MB2527: x-microsoft-antispam-prvs: x-forefront-prvs: 0981815F2F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(136003)(376002)(346002)(39850400004)(396003)(189003)(199004)(14454004)(71190400001)(5024004)(305945005)(66066001)(26005)(93886005)(99286004)(256004)(8936002)(81156014)(5660300002)(14444005)(52536014)(6436002)(9686003)(97736004)(3846002)(54906003)(33656002)(7736002)(6246003)(74316002)(2906002)(81166006)(78486014)(6116002)(53546011)(102836004)(8676002)(6506007)(55016002)(105586002)(229853002)(316002)(53936002)(44832011)(25786009)(4326008)(478600001)(476003)(7696005)(66574012)(486006)(55236004)(71200400001)(186003)(6916009)(76176011)(86362001)(11346002)(446003)(106356001)(68736007)(586874002);DIR:OUT;SFP:1101;SCL:1;SRVR:SG2PR02MB2527;H:SG2PR02MB3098.apcprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: einfochips.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: JQeeIFxDRRZf2zSfjen3AyGVAx0B+LCLCJYr4024lsVX7/szQtqhvRLrEr7cI/i9nUpl/UMQ2aC7CYBt/xAc8VLOs4mtVTMtrRK4foVMM3PRUnfTPPLdsZbUN2bpgjDMHUOdAbcEGpU6EOkJRxTwiXpah9MmGS2uiOEipthv3NbXrArs63B1mO8NnhWPnFwPtD8eisrVu0QquIA1hfFRPMc54TEJM8qPyYr+ImBZKYdh8XQSCA2VfYCaN7526rxWJvvmvLNk8Rfem56cLP4eD1S9u0JyuoLtCd7x4b7BjPCqLwvNBNGXcE2a8YDqK0SrUv5hUYQzLA9NjuHPH8JxclULROz/uzd1nA/McZW/57X30Va5oa+qeSwx1obEMJCdbwt1KrOlZSV37rmYk1hORP8kjjAGCyak0tyPjyzZ7qs= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: einfochips.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12e0e1bc-2895-425b-f9ae-08d6ac55d47e X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2019 10:29:55.6312 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0adb040b-ca22-4ca6-9447-ab7b049a22ff X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR02MB2527 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ________________________________________ From: Michal Hocko Sent: 18 March 2019 19:59 To: Pankaj Suryawanshi Cc: linux-mm@kvack.org; linux-kernel@vger.kernel.org; minchan@kernel.org; K= irill Tkhai Subject: Re: [External] Re: mm/cma.c: High latency for cma allocation On Mon 18-03-19 14:02:09, Pankaj Suryawanshi wrote: >> > I have the system(vanilla kernel) with 2GB of RAM, reserved 1GB for CM= A. No swap or zram. >> > Sorry, I don't have information where the time is spent. >> > time is calculated in between cma_alloc call. >> > I have just cma_alloc trace information/function graph. > >> Then please collect that data because it is really hard to judge >> anything from the numbers you have provided. > > Any pointers from which i can get this details ? I would start by enabling built in tracepoints for the migration or use a system wide perf monitoring with call graph data. Calling Sequence is as below. cma_alloc() --> alloc_contig_range() --> start_isolate_page_range() --> __alloc_contig_migrate_range() --> isolate_migratepages_range() --> reclaim_clean_pages_from_list() --> shrink_page_list() There is no built in tracepoints except cma_alloc. How to know where it taking time ? -- Michal Hocko SUSE Labs ***************************************************************************= ***************************************************************************= ******* eInfochips Business Disclaimer: This e-mail message and all attachm= ents transmitted with it are intended solely for the use of the addressee a= nd may contain legally privileged and confidential information. If the read= er of this message is not the intended recipient, or an employee or agent r= esponsible for delivering this message to the intended recipient, you are h= ereby notified that any dissemination, distribution, copying, or other use = of this message or its attachments is strictly prohibited. If you have rece= ived this message in error, please notify the sender immediately by replyin= g to this message and please delete it from your computer. Any views expres= sed in this message are those of the individual sender unless otherwise sta= ted. Company has taken enough precautions to prevent the spread of viruses.= However the company accepts no liability for any damage caused by any viru= s transmitted by this email. **********************************************= ***************************************************************************= ************************************