Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp444430img; Mon, 18 Mar 2019 06:44:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEK5INthiqx9svLDD3RmmKPLtl8o5NUes64dVpKJLCFmQiA4ck7BB+rtz+AoBAcHYgvpfm X-Received: by 2002:a17:902:b684:: with SMTP id c4mr20077010pls.294.1552916649822; Mon, 18 Mar 2019 06:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552916649; cv=none; d=google.com; s=arc-20160816; b=wpsl1JDPhygLcrKkorpX69W0KnidCYFjD+bJUdDb/9YiQRKSgsof3QUKIaFJdFBljz JtNmJUHdx3KjuwtwZzkqbkNEVQeTDSjH8tV/IGs29vYmYD/tBU8Vzv/t6R91yLBOSo9F mB5nGxMaunbujp/VfJt6J4kzg9ITNq/1oW5xHq/j316cxagLccVFKSbi9am9taaRb+10 sMdYaMYU+1Aq3mihwztVS9sWXYyv7n7YRy9SYcRPxKLRLdvTRnyBnhGp20NqJ8h2j+Uc sO4F7YGWnTFh9qFevcO/1kRFtdmYz7FAK+vOwFb5ushxcxA5s01VLPAtTjUOGEMkCEiS Fc/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zjQi+9WqYpVnuIzbFCKzrTAxjEnz0vXipHf4nqAU0hU=; b=LMzzRKu0EQ7IUOvH+mPf3YL2sdkH1HSf+jQz9llVqaXgsFag29r2jXSKB3Wb+j6LvJ +TjkyE0bn3Gq9NURMmYJS8slfgpHgbFD7h0Fqbye32XWB+E4QwZPS8old0vAClhP5ZZF UACLLK8otmvoU59kMa4ofblPIanP4ssXBpI9TJ110OnD/78ZxMIIqJZOPnnlflvYYKr6 n1Qio5mD88lmdaX7+BYqsqpZ2xQvbUSrOpKrzTUYBXVC0RuFZYTffd9YVCDFBCOyI0jQ T5xTRp/TBQzHLIbuyPaw9c70VqlL46K+DATFPSI/tOqMGRMHZRrdWfVzr/dHsGi27aoj qoxw== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d132si8964645pgc.482.2019.03.18.06.43.54; Mon, 18 Mar 2019 06:44:09 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727612AbfCRNmp (ORCPT + 99 others); Mon, 18 Mar 2019 09:42:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:45066 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726356AbfCRNmp (ORCPT ); Mon, 18 Mar 2019 09:42:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 83D40AD70; Mon, 18 Mar 2019 13:42:43 +0000 (UTC) Date: Mon, 18 Mar 2019 14:42:42 +0100 From: Michal Hocko To: Pankaj Suryawanshi 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 Message-ID: <20190318134242.GI8924@dhcp22.suse.cz> References: <20190318130757.GG8924@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Please do not use html emails to the mailing list and try to fix your email client to not break quoating. Fixed for this email] On Mon 18-03-19 13:28:50, Pankaj Suryawanshi wrote: > 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. Then please collect that data because it is really hard to judge anything from the numbers you have provided. -- Michal Hocko SUSE Labs