From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B899DC433DB for ; Fri, 5 Feb 2021 01:44:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1A46F64FAA for ; Fri, 5 Feb 2021 01:44:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A46F64FAA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 766596B006C; Thu, 4 Feb 2021 20:44:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F0B76B006E; Thu, 4 Feb 2021 20:44:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E00A6B0070; Thu, 4 Feb 2021 20:44:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0036.hostedemail.com [216.40.44.36]) by kanga.kvack.org (Postfix) with ESMTP id 4539B6B006C for ; Thu, 4 Feb 2021 20:44:35 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 137443621 for ; Fri, 5 Feb 2021 01:44:35 +0000 (UTC) X-FDA: 77782519710.22.worm93_3a1654b275e0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id EAB4918038E67 for ; Fri, 5 Feb 2021 01:44:34 +0000 (UTC) X-HE-Tag: worm93_3a1654b275e0 X-Filterd-Recvd-Size: 5185 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 01:44:34 +0000 (UTC) Received: by mail-pl1-f174.google.com with SMTP id a16so2738208plh.8 for ; Thu, 04 Feb 2021 17:44:34 -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=NXYPs03YVXv6Rx4QTs1ZzQJ33I4N7Nov5fRFgiQQ35nHaVNlf6iSbfT9lu2lHYIehp y05k/vXbqNguPo0eDNsJ5Jlgh5VQwBwK7CvKaD7Rf69Lnj/BPxpzNGQA3Xu2o0Neh/Wy tdgEUBVheMRoeA9TgoWAYj6IKmgaO6U9KxEr0w8b6VVfEGPQpkYqtkDoUP7gXXT1Gn5a ky6G3Rf4q/RNpZOH2/q5EfbYBzuQ+44nAFcksafgotGJX2bsG3g3zyvH/7WygT7ut5BH 8OJZezFTbRz/MMcNRgaWcDAkQr2G4CVYpaLQZIOehlxWgLr/H/M391K7thalTXoS+uDb IzRw== X-Gm-Message-State: AOAM532JW0rGxszKKSfwr0BRA+Py5kULqAnSexdd8ywaKEM8Ih0A/Lmc C1cN6Z0dIJEdOD5aTmf1f7Q= X-Google-Smtp-Source: ABdhPJyhnPOTnyG1gNOgRhrsWsaDbd/taOxvYyyd0yPNXSqaA1gHQyraOSVux35p5H/gRljI1J8vCA== 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) 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.