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.9 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 7A84EC433E0 for ; Fri, 5 Feb 2021 06:41:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D29FD64E12 for ; Fri, 5 Feb 2021 06:41:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D29FD64E12 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 128E76B0005; Fri, 5 Feb 2021 01:41:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DC786B006C; Fri, 5 Feb 2021 01:41:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F33C46B006E; Fri, 5 Feb 2021 01:41:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id DCCF06B0005 for ; Fri, 5 Feb 2021 01:41:17 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A10BA180AD81A for ; Fri, 5 Feb 2021 06:41:17 +0000 (UTC) X-FDA: 77783267394.08.mice13_390bbb6275e2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 88E721819E772 for ; Fri, 5 Feb 2021 06:41:17 +0000 (UTC) X-HE-Tag: mice13_390bbb6275e2 X-Filterd-Recvd-Size: 3854 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Fri, 5 Feb 2021 06:41:16 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 04 Feb 2021 22:41:15 -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 06:41:15 +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> <87d7ec1f-d892-0491-a2de-3d0feecca647@nvidia.com> <71c4ce84-8be7-49e2-90bd-348762b320b4@nvidia.com> <34110c61-9826-4cbe-8cd4-76f5e7612dbd@nvidia.com> From: John Hubbard Message-ID: Date: Thu, 4 Feb 2021 22:41:14 -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: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612507275; bh=MVQPZX7CqWSAXEBpuiD9KIrZsqcSefGwB9+cJEmNR/U=; 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=ZFByrRMHweXhGS7HmqX+9r2j16FGVfJ0523O0aw40mEjjCqf7K2AucMH+RRnQ27JC +LlmYuuFNwD9ITf7dCQVWk0MJcfymXZI6xLvtraTM9qeoSG1fANpW/kXnwNYUhdeIF r57DT+MF6BGpsPTF/EIBscJmobATGHQ4uHuGWmgksjIyUnrYYft9Xdt5jHNMMADFDD OYJKTv1uRf3YFls9HvTopvWDcCIVngeRbJtCtPd3279I7Gn94/XkSMsqxo/hgu+G+l +53SVmSbWrx4re2Zew/yDEHji6Fw2YYXxNPqL4+qJj+iFt07EtqXTy+Wz0CLKRXZ05 ze5dYmvkPqx7A== 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 10:24 PM, Minchan Kim wrote: > On Thu, Feb 04, 2021 at 09:49:54PM -0800, John Hubbard wrote: >> On 2/4/21 9:17 PM, Minchan Kim wrote: ... >> # cat vmstat | grep -i cma >> nr_free_cma 261718 >> >> # cat meminfo | grep -i cma >> CmaTotal: 1048576 kB >> CmaFree: 1046872 kB >> >> OK, given that CMA is already in those two locations, maybe we should put >> this information in one or both of those, yes? > > Do you suggest something liks this, for example? > > > cat vmstat | grep -i cma > cma_a_success 125 > cma_a_fail 25 > cma_b_success 130 > cma_b_fail 156 > .. > cma_f_fail xxx > Yes, approximately. I was wondering if this would suffice at least as a baseline: cma_alloc_success 125 cma_alloc_failure 25 ...and then, to see if more is needed, some questions: a) Do you know of an upper bound on how many cma areas there can be (I think Matthew also asked that)? b) Is tracking the cma area really as valuable as other possibilities? We can put "a few" to "several" items here, so really want to get your very favorite bits of information in. If, for example, there can be *lots* of cma areas, then maybe tracking by a range of allocation sizes is better... thanks, -- John Hubbard NVIDIA