Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1615339pxb; Thu, 4 Feb 2021 18:41:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtlff0ai01W7lxVhpXOKl+KOk9VJRONeeOmVEwYxdaCpK4c6d6hCOhgYxKpt7N0gKEylGI X-Received: by 2002:a50:bc14:: with SMTP id j20mr1465080edh.381.1612492915355; Thu, 04 Feb 2021 18:41:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612492915; cv=none; d=google.com; s=arc-20160816; b=QxB3jZI9EbZwLKtsNR/Krp1nW5XbZF7riF/9XMMEgPAJiZfWc42Ho2G+B2VghXzOvu r6e7EMOHHltwuPyJNPfMIeiJOEQsTVhtMQNj+Vqz8bJ+stoUq+Ydj8No9b6fX1Tz5Jts IBq1Q+1Fb/VX4yUgBZGMUnCFS6sg3Lfubm1WF66++4efvmQgE7Or7tV1uKIazenYnhrl dc2ux6nUwN94OJLUtlwx6dZqx0wCEDurmTuuMGOpNXviwBcJK4xPMbCzwOVknmGGU29Y Dn93bs3y3ZEdktvn3IdnGJ5FcxfAHLLm8D3SCVqDjJsYhu5M0RUotFn/7z+B+T7j+Loh lkTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KrxuWR/Lm4v4BWcac9Ts2j/JMY/RAA6h700GnlMoUbk=; b=oShMkr65oORwxFPFeQweTpQYnXgsS4gbr5cIzV1OaBxeZkJtY+5dIFMRM5KzDWJxPm wfB2ANFYi48i6EntoiHjeloC84qHq0cDykGuv43ccJxodckJehKq3xAvW+wPLzclmUla /sJtbpFt8JFIaSSK5lr0MTIcm+MXXfl03Z1QEl/WWQPkxGzVIn57Q9wUvktx8Vtvr1+s O0+LrXVmZypqm5hmHuQDvgTERbIJUGOd1FJi9b24Ij14I1MC0UrC1k20PS8jGwFJzxp/ bxNCnW8YCP7W2XmFQE0YRTluRkVM2oKEOvgXgnc0hQxQ47FnbgG+sj6reSqjJfae1hBe XE3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BOn1mNtq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j2si4195220ejb.229.2021.02.04.18.41.31; Thu, 04 Feb 2021 18:41:55 -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=@google.com header.s=20161025 header.b=BOn1mNtq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229721AbhBECkx (ORCPT + 99 others); Thu, 4 Feb 2021 21:40:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbhBECkv (ORCPT ); Thu, 4 Feb 2021 21:40:51 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98A07C0613D6 for ; Thu, 4 Feb 2021 18:40:00 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id c4so5889920wru.9 for ; Thu, 04 Feb 2021 18:40:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KrxuWR/Lm4v4BWcac9Ts2j/JMY/RAA6h700GnlMoUbk=; b=BOn1mNtq3puSazs0rViio49lg0t/e1BTWkIt5KnAQ9+Leu+6wtf9fZJ4ahbIH6NGZE 1Tvz9u5MV0MvZNT6vPJJ9iftmwcFVom5j1I2ZkkRZew+ntGs81+G0R1R1tXs9HArCdUV P9Yodyq7r5/o0DLjI/VlezJ+VKS6bsOAde0GLNaok6TeoT4NPQAWeB8EFpBse3KIrT9y TqqW10gU876llTurg6M2nUXMvGDOzRQbVkWMcOUpZEsAbBMtnGxWQV+vyVI+lBVNi77K e2GLaOSkTsnQcMEf66aa7msysph6sdlTa6QJlA1N/OcxGKZicVjO32cj74CNtR89JLiv wwuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KrxuWR/Lm4v4BWcac9Ts2j/JMY/RAA6h700GnlMoUbk=; b=JNmt1+K7pRg0oHY0Vnxpselgxi5hbvj2We3ihNX2v5CRtotiE/Jn8KsUKvUoxsvsO7 jv/2tK4YBbsfXL6wyld0KD9K6u1LhteTtC4eF6pa2lXkFn6E2zxImQDbNf9UoCOhAVhJ pwZOMszbpoW8klzIpiP/nNbnSCyEC0ohSUXiGHGqyco5w1gO4VnvBl8iDVqdtkmdnEjX o3LVInlcEBTwxgVk1iE9X/A8J5BWzIy5pSarQ4UdMbi+KeTuJ246Nd3JbWWSWwtQtyzW wwe/vBl5T4pA8TdWKZ4ZH/PKtJsb9ekUyWyt1o62c7yfNKOoEdwiqWhswHBRfTIAhUN6 h1CQ== X-Gm-Message-State: AOAM532aBCTwG7L9kuCQq1hbMKuNOGmFJ18cvMgC5X3efz187JE9TAso pjkjjmiQMc7uNgV7LLeKVXokbIClGyfeTb8wDIx2Wg== X-Received: by 2002:adf:e50e:: with SMTP id j14mr2437426wrm.162.1612492799266; Thu, 04 Feb 2021 18:39:59 -0800 (PST) MIME-Version: 1.0 References: <20210203155001.4121868-1-minchan@kernel.org> <7e7c01a7-27fe-00a3-f67f-8bcf9ef3eae9@nvidia.com> <87d7ec1f-d892-0491-a2de-3d0feecca647@nvidia.com> In-Reply-To: From: Suren Baghdasaryan Date: Thu, 4 Feb 2021 18:39:47 -0800 Message-ID: Subject: Re: [PATCH] mm: cma: support sysfs To: Minchan Kim Cc: John Hubbard , Andrew Morton , Greg Kroah-Hartman , John Dias , LKML , linux-mm Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 4, 2021 at 5:44 PM Minchan Kim wrote: > > 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. Oh, I missed the fact that you need these stats per-CMA.