Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1597401pxb; Thu, 4 Feb 2021 18:04:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyR9EeUA2Do2vDG9ojxwIOgNSqtyEeza372956u79WzBHGyIHWgB0r5I5uY+QMccONmtl4U X-Received: by 2002:aa7:cd0a:: with SMTP id b10mr1352543edw.153.1612490687930; Thu, 04 Feb 2021 18:04:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612490687; cv=none; d=google.com; s=arc-20160816; b=0LHocCT/pKsPfnC0Og3pW5D/mIS9F65zRMbOgYmHMOOW93guPQB3N6CcTOc5D8GORe ZLGFIeA4kuSWrIts2tZho8oJI11t1kgGhlYjpTC29MWqy9bMN54Na6BO56/RolnLKKhj pin0FJaT68j//GQuS05F6OGbjrcc5GSynoI/6f2OFfidVHbnpdKXGgO1BBNN2m6Di4M0 2rYFpkGm/HA1M2yrKBio8NV1vA2MZKawkdVfJS0XvXOb87S7vRZAtNAhijLc+z0j2mgs aXoVp6v2SxZ9c1wjp6ePpZ7QoskVO2SCKmLiBkfKQAYRwksLOHiivEcCj0bxl7Pxitcb qHGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=8auo+sSN8LUCz7eHTWD1b9cMbXkiEhCmkanvQ8Grsig=; b=EYQ5YelLG0C1c0UQQ6EAUoIequ4naJfVsI/MP8+4T2ZK76LkFT+Ru8U35oNvN+VfS2 fdgpstzycte9yIi9jHKMfdPLfK48YXP4PiomoOZiYljwSADzqvJ0tL1SBJGCScl/1MOe u/WMzHmSR8abEblfFUBxY50lrhazpBpahzSMXcRJoxwpt8x+uatHUGziCFrFK4phBHoI C5ELk7ND1KccOV5ibUifjE77p91VfKmFkMwf+A/ExwcRR5ZjwifkaXxbcHFMWYWxiHFe AVv+qaQ1Vtd5rXrZFUfxZ80BtfRlRAYaUSLAVym/wVnxpi75hmO0Jw6SjvrVT6iBSF9N 3tjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="lSP+/pdh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si4254820ejc.573.2021.02.04.18.04.23; Thu, 04 Feb 2021 18:04:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="lSP+/pdh"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232892AbhBEBpQ (ORCPT + 99 others); Thu, 4 Feb 2021 20:45:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231650AbhBEBpO (ORCPT ); Thu, 4 Feb 2021 20:45:14 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06AFC061786 for ; Thu, 4 Feb 2021 17:44:33 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id d2so2900187pjs.4 for ; Thu, 04 Feb 2021 17:44:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8auo+sSN8LUCz7eHTWD1b9cMbXkiEhCmkanvQ8Grsig=; b=lSP+/pdh3y2lFN9b/qpJuWN5sk4tPHXU9ntDqio/ZXgxGVnag1PzvR9CE1ydFmIOVM qPPvlMfjpO2+bnMbTOz17WgumqEBmNOwD+/igWomlhES5IjUOAge+6DKCcxNQQkHvgOw y0P7o09kg/SWPt9LpPPTCEMOn0YbyIe7It3SlygVh9hg5kCdmfv2xCTISJDtLigGwyPf Qpu1kbvWZHYsLQLKF1IG018wGhaYi3XNOP43+UvJHlcKAdjlNCsYU+8EkmbmbMzfj70i ifVdMyMpDMJU99yhW27hF9FOM+ciH2+/xiQ11E1gvmDXrbTwShUCsiZpuAFpbTnmOIyj WE3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=8auo+sSN8LUCz7eHTWD1b9cMbXkiEhCmkanvQ8Grsig=; b=MXyiVzBM9lM8OvpnKNZraxdTeJwWkEa4cVfzIYSin+t1AejPxb2SZQM77SrOmYx5fC ckvqcpsbl4WCwl4kz2BYMTBYeTsdjurdfE7yGQ6BFcv2e70w0+S81QT19JvYi6B3ctMb fZtcpfiNGZAyrDfLIRHg+He52cEU1RnCCP7T4MWUvHltXrVdGRGQCyqnfyjMKE2i2DUs SY7Ot2oJiikvGLG0NRFB8UPG2y6ztYEmfzDYBy3V9N6VVuLoIAiraww9oJZgB65BWTqT W6L4qBvMizhp5Y5mTaqVCDqmWCqnFNC/UR5X/YRURZqPKZuz7jFOCFkH6pdfH/fnNZ7p tJGg== X-Gm-Message-State: AOAM530tH4U6+CfqeTBSk2QkXj+DazD80YlPbND3sR6e8Brk7rFgH7Vh z4emu0Bu5C0HUWG9RSFEdyA= X-Received: by 2002:a17:90a:7ace:: with SMTP id b14mr1824677pjl.208.1612489473455; Thu, 04 Feb 2021 17:44:33 -0800 (PST) Received: from google.com ([2620:15c:211:201:598:57c0:5d30:3614]) by smtp.gmail.com with ESMTPSA id y73sm1675009pfb.17.2021.02.04.17.44.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 17:44:32 -0800 (PST) Sender: Minchan Kim Date: Thu, 4 Feb 2021 17:44:30 -0800 From: Minchan Kim To: John Hubbard Cc: Andrew Morton , gregkh@linuxfoundation.org, surenb@google.com, joaodias@google.com, LKML , linux-mm Subject: Re: [PATCH] mm: cma: support sysfs Message-ID: References: <20210203155001.4121868-1-minchan@kernel.org> <7e7c01a7-27fe-00a3-f67f-8bcf9ef3eae9@nvidia.com> <87d7ec1f-d892-0491-a2de-3d0feecca647@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d7ec1f-d892-0491-a2de-3d0feecca647@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 04, 2021 at 04:24:20PM -0800, John Hubbard wrote: > On 2/4/21 4:12 PM, Minchan Kim wrote: > ... > > > > Then, how to know how often CMA API failed? > > > > > > Why would you even need to know that, *in addition* to knowing specific > > > page allocation numbers that failed? Again, there is no real-world motivation > > > cited yet, just "this is good data". Need more stories and support here. > > > > Let me give an example. > > > > Let' assume we use memory buffer allocation via CMA for bluetooth > > enable of device. > > If user clicks the bluetooth button in the phone but fail to allocate > > the memory from CMA, user will still see bluetooth button gray. > > User would think his touch was not enough powerful so he try clicking > > again and fortunately CMA allocation was successful this time and > > they will see bluetooh button enabled and could listen the music. > > > > Here, product team needs to monitor how often CMA alloc failed so > > if the failure ratio is steadily increased than the bar, > > it means engineers need to go investigation. > > > > Make sense? > > > > Yes, except that it raises more questions: > > 1) Isn't this just standard allocation failure? Don't you already have a way > to track that? > > Presumably, having the source code, you can easily deduce that a bluetooth > allocation failure goes directly to a CMA allocation failure, right? > > Anyway, even though the above is still a little murky, I expect you're right > that it's good to have *some* indication, somewhere about CMA behavior... > > Thinking about this some more, I wonder if this is really /proc/vmstat sort > of data that we're talking about. It seems to fit right in there, yes? Thing is CMA instance are multiple, cma-A, cma-B, cma-C and each of CMA heap has own specific scenario. /proc/vmstat could be bloated a lot while CMA instance will be increased.