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=-13.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 6B426C433DB for ; Wed, 17 Feb 2021 21:19:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EB31964E58 for ; Wed, 17 Feb 2021 21:19:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB31964E58 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 627636B0006; Wed, 17 Feb 2021 16:19:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D7A86B006C; Wed, 17 Feb 2021 16:19:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 49F4B6B006E; Wed, 17 Feb 2021 16:19:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id 3419C6B0006 for ; Wed, 17 Feb 2021 16:19:28 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id EE8031839A9D8 for ; Wed, 17 Feb 2021 21:19:27 +0000 (UTC) X-FDA: 77829025974.15.33C81B8 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by imf17.hostedemail.com (Postfix) with ESMTP id 72FFE407F8EB for ; Wed, 17 Feb 2021 21:19:26 +0000 (UTC) Received: by mail-pg1-f175.google.com with SMTP id t26so9320106pgv.3 for ; Wed, 17 Feb 2021 13:19:27 -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=Hdfte6859K4H28Potw2xMsDUKaSnL8kHSeZpJtB9aBQ=; b=VTJrGc+I2OYjOLy0h17IahPi6ZQYjBp0LBYRgedbumbhvM4iNM5QE6qr65jyyCAo8y 1dla0zVEm68iki5zLY3D232Ln0WqlObkpcBLTm3bIP+GrE+eblDozC/jtwaLrCqf8dpi WHrVR5/6bo81yZ6bS4FSe2yA8cB+8vQz9WsgkMTcWBvMrj+9Jz98cZvHsc12pDFRoySP /6Fh46S5rfaqgsHouUjn3rcv8UWPhLo72XjBnW0chq6Ee0ZrXlHi4GswyKsw1C4pXoxx +uxQGKzcWI8GbXc7ZLwxJCMrSNAthsavJu9b+ALyATxin6rLPyYoWAYHKQkO2NrRnZQe QTxA== 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=Hdfte6859K4H28Potw2xMsDUKaSnL8kHSeZpJtB9aBQ=; b=BkCbN43TmCukpIZS2Jqh3DYCiv7Bd6BfzI4oLjS5aLvO/OYDocZdm50JWkI06S4gFF vwY1UNrzt74Ytl2mCceEjb1tr8bNku5CpA4GE1NoZAeiUbvTg34lQZGYDxxT5XqG7jBQ s5wTzLQSCuLVoGXQ7wZOX+YxhKLuTzKsyYORdzDHK+RxmAmAFTE4ZBAF43/GzaTHdRtT MNQrItzNI9nToR50J80kXt5uronHT+qF0EX2Fb6NezVPbNNx2a785SMKcDMXPGT50IuB A2O46+sNuiw2NY6fzthVJKgyJ24jmjRncEOJ42Cu6RKAUvBtGbirO/i4mTgv/ObdHKaG nQug== X-Gm-Message-State: AOAM530QU/JQP0ePJm9PwwLo/WHl2JYf96o60lMcAEg553PCl+yuH2kX GjYATZq0YV9tY5lbWJdp8QA= X-Google-Smtp-Source: ABdhPJyixckF078hxEEj7ezuKuE6z1m4Hw7ROqPDMlNVdcs+ufQxpdBhzNQ4Yo4HyM7luIxb1K/H5Q== X-Received: by 2002:a63:4e08:: with SMTP id c8mr1080362pgb.87.1613596766489; Wed, 17 Feb 2021 13:19:26 -0800 (PST) Received: from google.com ([2620:15c:211:201:157d:8a19:5427:ea9e]) by smtp.gmail.com with ESMTPSA id b10sm1736339pgm.76.2021.02.17.13.19.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 13:19:25 -0800 (PST) Date: Wed, 17 Feb 2021 13:19:23 -0800 From: Minchan Kim To: John Hubbard Cc: Andrew Morton , linux-mm , LKML , surenb@google.com, joaodias@google.com Subject: Re: [PATCH] mm: vmstat: add cma statistics Message-ID: References: <20210217170025.512704-1-minchan@kernel.org> <8036d8e6-8e96-7b4e-91c0-e1ae91b637e1@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8036d8e6-8e96-7b4e-91c0-e1ae91b637e1@nvidia.com> X-Stat-Signature: 585598h3cfi7ho679eztmedhcnbqr5dm X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 72FFE407F8EB Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf17; identity=mailfrom; envelope-from=""; helo=mail-pg1-f175.google.com; client-ip=209.85.215.175 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1613596766-522534 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 Wed, Feb 17, 2021 at 12:57:25PM -0800, John Hubbard wrote: > On 2/17/21 9:00 AM, Minchan Kim wrote: > > Since CMA is used more widely, it's worth to have CMA > > allocation statistics into vmstat. With it, we could > > know how agressively system uses cma allocation and > > how often it fails. > > > > Signed-off-by: Minchan Kim > > --- > > include/linux/vm_event_item.h | 3 +++ > > mm/cma.c | 12 +++++++++--- > > mm/vmstat.c | 4 ++++ > > 3 files changed, 16 insertions(+), 3 deletions(-) > > > > diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h > > index 18e75974d4e3..0c567014ce82 100644 > > --- a/include/linux/vm_event_item.h > > +++ b/include/linux/vm_event_item.h > > @@ -70,6 +70,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, > > #endif > > #ifdef CONFIG_HUGETLB_PAGE > > HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, > > +#endif > > +#ifdef CONFIG_CMA > > + CMA_ALLOC, CMA_ALLOC_FAIL, > > This seems wrong: here it's called "alloc", but in the output it's > called "alloc success", and in the implementation it's clearly > "alloc attempt" that is being counted. Argh, I wanted to introduce CMA_ALLOC, not ALLOC_ATTEMPTS. Let me fix. > > Once these are all made consistent, then the bug should naturally > go away as part of that. > > nit: I think the multiple items per line is a weak idea at best, even > though it's used here already. Each item is important and needs to be > visually compared to it's output item later. So one per line might > have helped avoid mismatches, and I think we should change to that to > encourage that trend. No problem. Thanks for the review, John.