Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1594034pxb; Thu, 4 Feb 2021 17:59:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZ2WSMe+Hfk2o2bXmWjeP7BU8BjhmbYDyAu7PHLhjeDtn0I7QPsJyjxQ9lKWVUdna2xW06 X-Received: by 2002:a17:906:2583:: with SMTP id m3mr1788657ejb.499.1612490362727; Thu, 04 Feb 2021 17:59:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612490362; cv=none; d=google.com; s=arc-20160816; b=sq/uwtC9wDMkNDcSUQhhHmUjukqQjQZqo549r/RAMrHsnN0TC/dPEj3lFMDoLZmdss P3A/+l+qQQoDWL/hAAETZ0HAKoyxZUB7mS9Y+/V/JmhdpYhnJFbKZT6tvObGseBSz7BS yzRZsIudyhb0gwU0pFfbs0FSts43N1X2675T9m/884qqV4Hy6Kgy61LagVN8JhFAcX6r ArWSbv3/MbgRdEsG6t4yT0FsWQepOD44PFqDqrDSRqrhc10bWvHoNKLEKduzAAZ0TQok DzzA1mvsnXpgRy5iKd5nHoPG3far6gT6fTJdB9JvDA1hcAvPXNL6VeTqoSmFua2qpopX jhsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=QNpWoAKqjfuTsV9sOzKjWbFc+zyBhskLyL0+eKYeBw0=; b=kFLcpBAdlpCQuRLKsfEIAkWpaDSurRlXfzseypL+IWuGRCO283VPGHfLuFoN+Y6gBB zz4ASKjZl/MvizHEVX48lSKACYXXC8pabf/1ZUirvkIqgx/SeSkkLggDT+yumDso5xNu XeU84Q5QC4Lnxeju9RdjJz9r3cHZbEau4+FNEC9V41Qu9kI36fTUO0jgvPuRB7rwcUDv iUO+X/2UskYwMV3hb4uZOjSpUE5Fe75xXwQI/9pBi0Tw6zAvIVAU1Ayo9DhZjsvTjdor ZeAm5DQLcZpI5xN1Wg/xak7nKx2KXYwyLCB0Ij8cq1LYZWXyTDYjgx1/DyuCHe/v30BD HC7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=JFVYRuwI; 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z95si4407332ede.403.2021.02.04.17.58.58; Thu, 04 Feb 2021 17:59:22 -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=@nvidia.com header.s=n1 header.b=JFVYRuwI; 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231837AbhBEAZD (ORCPT + 99 others); Thu, 4 Feb 2021 19:25:03 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:7158 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbhBEAZC (ORCPT ); Thu, 4 Feb 2021 19:25:02 -0500 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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