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=-7.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 D6D1EC433DB for ; Fri, 5 Feb 2021 00:24:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3AA6564D92 for ; Fri, 5 Feb 2021 00:24:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AA6564D92 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AD4646B0006; Thu, 4 Feb 2021 19:24:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A5CFF6B006C; Thu, 4 Feb 2021 19:24:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 924476B006E; Thu, 4 Feb 2021 19:24:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 77F946B0006 for ; Thu, 4 Feb 2021 19:24:23 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 43D4B8249980 for ; Fri, 5 Feb 2021 00:24:23 +0000 (UTC) X-FDA: 77782317606.06.CF98A5E Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf04.hostedemail.com (Postfix) with ESMTP id 19AE7136 for ; Fri, 5 Feb 2021 00:24:21 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 04 Feb 2021 16:24:20 -0800 Received: from [10.2.60.31] (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 5 Feb 2021 00:24:20 +0000 Subject: Re: [PATCH] mm: cma: support sysfs To: Minchan Kim CC: Andrew Morton , , , , LKML , linux-mm References: <20210203155001.4121868-1-minchan@kernel.org> <7e7c01a7-27fe-00a3-f67f-8bcf9ef3eae9@nvidia.com> From: John Hubbard Message-ID: <87d7ec1f-d892-0491-a2de-3d0feecca647@nvidia.com> Date: Thu, 4 Feb 2021 16:24:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Thunderbird/85.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612484660; bh=QNpWoAKqjfuTsV9sOzKjWbFc+zyBhskLyL0+eKYeBw0=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=JFVYRuwIetZniAxx9W5UDUvlhp6apu+NHHU+KBR5So6iHs2wQRuMlS5qWmdQmat5j 9w+4UjNQ/Q5bbFN522YUAEknwyRFRRYb1Mb2089uxoXFIcP7jufEYvCSe8VA/nSAoB zDgYUh/f2a7vDSSR8ahUG8geXv/CQRRfAnMA8gIdXlognCxgDqMS/06ntVDKMkL7y6 m4RH+BiTEsiT7Z0E7w4lSx1LSMecI/aNwzaUMnU2fBCwqbsoqiLjnKZtj6+Vq08G46 ChVJci1xJx1Tqq8Zk28+LADmH4+EJjAxFdwY1EoJ7oNQylzWElZ6h6ubch294qlakI tHbylihqugikA== X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 19AE7136 X-Stat-Signature: 1fi4tt1mzhodyf19ubigyta4dttj46d8 Received-SPF: none (nvidia.com>: No applicable sender policy available) receiver=imf04; identity=mailfrom; envelope-from=""; helo=hqnvemgate24.nvidia.com; client-ip=216.228.121.143 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1612484661-725420 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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? thanks, -- John Hubbard NVIDIA