Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp434048img; Mon, 18 Mar 2019 06:31:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXGuzLIdcjTVnlcc9jdNKicEqdjm9SNRJq8rrjnvpWApVr620drt+WdJstJymq9ozzim97 X-Received: by 2002:a62:1f58:: with SMTP id f85mr19113124pff.39.1552915871342; Mon, 18 Mar 2019 06:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552915871; cv=none; d=google.com; s=arc-20160816; b=eSztLchitOIomoF8sGDyjl+rQ9xaSUbqBPHsmuJkPdqc/hOg4+jb7DR/5qYt3XzCZV rqXVBnzGQJDWbChyOLfuxI6MDkbQUnCU1Go1ldqXxZao7wXj3fUQ6o8iVZ9od1EVr15y 4MKd4FHrdBMlmshhqtBMfbb14QzGtN8Ku2Oh9i4H/ZNzyJHS1Zw986Ik+x8JQ2WuKKBF 6UHUaP1ihgZlZIjQXH8Js/qKMNEsrUi0dKvJ8poN3fpUYu6JofCo30BixgiyOEw/WqYc uj+xG7bbgC/4LNnwNTYZ7OKdYOajIG0DQEKEg2pc3thRvfzZUuGxOw9OjWTxhT8neQ7O y/Fg== 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=drNPRNXMxYzVcVNuj6iqzhmMu+oEpiaawcBiiEZ5hwI=; b=CPM86tfD/+jeN983mKCx2avCQFi+LUMCqbgy70/tP1Nzs4pDI1W8lKEXEPy5602khv GQfI6mczpm61vkyckUVH6AdvIi3QOSZn2c6IZY8h1bSojEnR86sBAVMcQAAigVw2p+SJ RmNZkRDXW+vfvdddxO42vGcJhEkvb1sjH57g2FadA1CAvPJtJ9HtAl43qsa6ZbHH2BBf G1O6iovfLXbYSf1d65enpAE65/A6fU5sqpCgZAWXHbxTvnId8+qAwTvMWSHvPjQOAIOI ju4EIDj1Tadt13OXRsdS9tCYVAramydzK2GDMaE+GVuTg0n/2IO0I9ieX1l940FwjCcb VL5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@eInfochipsIndia.onmicrosoft.com header.s=selector1-einfochips-com header.b=RddUyaXZ; 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 s12si9094969pgi.416.2019.03.18.06.30.55; Mon, 18 Mar 2019 06:31:11 -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=RddUyaXZ; 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 S1727376AbfCRNaQ (ORCPT + 99 others); Mon, 18 Mar 2019 09:30:16 -0400 Received: from mail-eopbgr1300082.outbound.protection.outlook.com ([40.107.130.82]:22848 "EHLO APC01-HK2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726202AbfCRNaQ (ORCPT ); Mon, 18 Mar 2019 09:30:16 -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=drNPRNXMxYzVcVNuj6iqzhmMu+oEpiaawcBiiEZ5hwI=; b=RddUyaXZvHz1gSTsLrjFo6Y76zOgZ1nUDhUQD9ncDbwu0AZaJk5WONS688aipvbz6lMpMtYmw2Hvbj9ND5h1N90Agyw1GFVuEtTVqQ5k2wRw8cPtVY6HuTRuynsiUSRiyF6HhzoZq+73bfia9D2KJIjV5JFAoTZGBs5z/UmXxpA= Received: from SG2PR02MB3098.apcprd02.prod.outlook.com (20.177.88.78) by SG2PR02MB3179.apcprd02.prod.outlook.com (20.177.86.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.15; Mon, 18 Mar 2019 13:30:12 +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; Mon, 18 Mar 2019 13:30:12 +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+1ZFJR3Y1R16YRXCGAgAAGDUo= Date: Mon, 18 Mar 2019 13:30:12 +0000 Message-ID: References: ,<20190318130757.GG8924@dhcp22.suse.cz> In-Reply-To: <20190318130757.GG8924@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: fe07ad14-3123-48ec-8332-08d6aba5d97e 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:SG2PR02MB3179; x-ms-traffictypediagnostic: SG2PR02MB3179:|SG2PR02MB3179: x-microsoft-antispam-prvs: x-forefront-prvs: 098076C36C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(136003)(366004)(376002)(39850400004)(396003)(189003)(199004)(476003)(6246003)(66574012)(11346002)(446003)(6506007)(78486014)(102836004)(26005)(14444005)(5024004)(7696005)(6116002)(3846002)(99286004)(55236004)(53546011)(186003)(76176011)(54906003)(316002)(33656002)(55016002)(97736004)(9686003)(71190400001)(71200400001)(105586002)(486006)(106356001)(53936002)(44832011)(6436002)(52536014)(66066001)(6916009)(25786009)(4326008)(86362001)(305945005)(74316002)(8936002)(478600001)(8676002)(7736002)(14454004)(5660300002)(81156014)(68736007)(81166006)(256004)(2906002)(229853002);DIR:OUT;SFP:1101;SCL:1;SRVR:SG2PR02MB3179;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: iL7+Gm5XDls7xLItnjLLgTTX0S4z0cvgrjUkL2jUV4fOvDhAvuwJwwihk4zkfRg/olx7b+aBfUaQBQEPHtoxNHDStqx2ogDd1zaW67KEm9WtfD8n2QXvYyWMKDMN5U84kGc7hFjXANu7DLFGanuIFz+EaNEJZU5jj35ntoYfwvUi6vFUrLYuAVNUB0+FvYxQu+9AneAyB2izsDq3RuSLwOQm0ZYjFO6YLs0igZpLicUI++gdmzu6O8tKk6GC78x4/oGgJXLg9/LE1aBqNjCKCycKtUD6+Qzdt6Cr+kvFFe2zs8B4JpfeBvJrwLj1hpTm2oUxMYtYb3rxIlNVZW/xShAHWeQfkP49u5FMcpxsnwSDa6tFo/JlyhlU7AUndh3nR5KXm6qgpZ1q0XzMf2T6WK0xLKgetP9n5C7oMK2a2Hg= 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: fe07ad14-3123-48ec-8332-08d6aba5d97e X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2019 13:30:12.4973 (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: SG2PR02MB3179 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 18:37:57 To: Pankaj Suryawanshi Cc: linux-mm@kvack.org; linux-kernel@vger.kernel.org; minchan@kernel.org; K= irill Tkhai Subject: [External] Re: mm/cma.c: High latency for cma allocation CAUTION: This email originated from outside of the organization. Do not cli= ck links or open attachments unless you recognize the sender and know the c= ontent is safe. On Mon 18-03-19 12:58:28, Pankaj Suryawanshi wrote: > Hello, > > I am facing issue of high latency in CMA allocation of large size buffer. > > I am frequently allocating/deallocation CMA memory, latency of allocation= is very high. > > Below are the stat for allocation/deallocation latency issue. > > (390100 kB), latency 29997 us > (390100 kB), latency 22957 us > (390100 kB), latency 25735 us > (390100 kB), latency 12736 us > (390100 kB), latency 26009 us > (390100 kB), latency 18058 us > (390100 kB), latency 27997 us > (16 kB), latency 560 us > (256 kB), latency 280 us > (4 kB), latency 311 us > > I am using kernel 4.14.65 with android pie(9.0). > > Is there any workaround or solution for this(cma_alloc latency) issue ? Do you have any more detailed information on where the time is spent? E.g. migration tracepoints? Hello Michal, I have the system(vanilla kernel) with 2GB of RAM, reserved 1GB for CMA. 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. -- 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. **********************************************= ***************************************************************************= ************************************