Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4444948ybv; Tue, 25 Feb 2020 20:27:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxkm7UsDtiYEcYCep1rij/TZIns55SW+FqaLnK3WAhLJkqjfkkAADJOB8WM9tNmD+fGBh4n X-Received: by 2002:a9d:7757:: with SMTP id t23mr1600017otl.315.1582691221901; Tue, 25 Feb 2020 20:27:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582691221; cv=none; d=google.com; s=arc-20160816; b=IHBpsM9cyV7Byhtgv8fETOKaysW0NGb/5NuCL09g0Ytd55vs46uB1oLDyA832ZA+Cp gtDZT7+0FrMarteKE6ihaSrUy8xZsD3+01E+sPPFjyOXerQyHp34zb2FY/VrUjOlkmxD YwDohFEH0SSwZYfokOxw/oPOQ+YTM+FBkpV1lKj92a8sjD3rY5zu4yydasBQpK3NFVy/ RZFiVmgYyEuzngEwCBEu+BVT2gcgLcHLblX5v9h/qJz4QhFU/d75+tJEFCRBVnOk8Ass ZXarwu/v/FrjaReOL0xntEL3G8xf4bFd4IaK/2Xb88lRSrhcJUjiQNZHt3YK70h3Wc9t 7hYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=83gDoyDlnRQ/ZUqMgV7ChYjSt3jJJvA9vZlseimex1Y=; b=faSmvtEIUvDuJ9EOcD1FHpEJ9YALZL3rcNadnnKgbZDiWpFeZLhQUp0iYN8thIWV0M NnH8eH+Ng0xg3bNs37X4g5Szg8ZXq1hxeP+FWatuEc6vVgYay3caBjwDOiPM9TfVNEVh xRqxRnu6+jlX9cB1ZgdFwNVKo+7DWyxeubaaJcRbSFD0Wg4YOjkrSnZCkfbn1JurUpu2 c2f4M+rc2q0zTm17jFFY0VVcPBTnsJI3JyslCGVvInjR80+pzhcM4yJ5P8+m3+btt5L+ tr9dtKjdhU38E2xUg3SwxQd1MjXKWOdwgyxbWORhVylGXBk5M2PwnnCGbQsFskQg6DjY ndhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=pawyRIvm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2si532181otr.255.2020.02.25.20.26.50; Tue, 25 Feb 2020 20:27:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=pawyRIvm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbgBZE0a (ORCPT + 99 others); Tue, 25 Feb 2020 23:26:30 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbgBZE0a (ORCPT ); Tue, 25 Feb 2020 23:26:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Sender:Reply-To:Cc:Content-ID:Content-Description; bh=83gDoyDlnRQ/ZUqMgV7ChYjSt3jJJvA9vZlseimex1Y=; b=pawyRIvmy4QVbsg2s7gnmOZlHm UCJNxH3pJFYYqipwSdDMobdwn+tkrAO9GinrkGIqpZqfBgSTQFdBeXD6MqBTE7hQiqdwU6XdFsX4+ oDqAh40wi9qsuEk00YDof3l/yDqeCGb7s2nPCBd46c4RgVqOX7uR6h3w3BHNv40AV3keYDBoNL+kB 6Xzul0EAVJtoxLaWRkdWNHRaDYkF2j35T+UyTAR8WRNbSbskvcpAAq4s4LbbA7CTyoXyjopy0GNmO nvsU1yb7a9SNhDQqBJYablcToEOhZKdNilpi497dx/R8So3Ws9iQQXPS6acZ3rLWuSh4GFmdmlIrL aox+OZsQ==; Received: from [2601:1c0:6280:3f0:897c:6038:c71d:ecac] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6oH7-0004qr-Jh; Wed, 26 Feb 2020 04:26:21 +0000 Subject: Re: [PATCH 1/2] quickstats, kernel sample collector To: Luigi Rizzo , linux-kernel@vger.kernel.org, mhiramat@kernel.org, akpm@linux-foundation.org, gregkh@linuxfoundation.org, naveen.n.rao@linux.ibm.com, changbin.du@intel.com, ardb@kernel.org, rizzo@iet.unipi.it, pabeni@redhat.com, toke@redhat.com, hawk@kernel.org References: <20200226023027.218365-1-lrizzo@google.com> <20200226023027.218365-2-lrizzo@google.com> From: Randy Dunlap Message-ID: Date: Tue, 25 Feb 2020 20:26:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200226023027.218365-2-lrizzo@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, (Aside: in patch 0, is "abube" a typo? Data are exported or controlled as abube. ) For both patch 1 & patch 2, please use the expected/documented multi-line comment style (in Documentation/process/coding-style.rst): The preferred style for long (multi-line) comments is: {except in net/ and drivers/net/} /* * This is the preferred style for multi-line * comments in the Linux kernel source code. * Please use it consistently. * * Description: A column of asterisks on the left side, * with beginning and ending almost-blank lines. */ On 2/25/20 6:30 PM, Luigi Rizzo wrote: > quickstats is a helper to accumulate in-kernel samples (timestamps, > sizes, etc) and show distributions through debugfs. Compiled as a module > by default; set CONFIG_QUICKSTATS=y in your config to make it compiled in. For inclusion in the kernel source tree, it should default to n, not m. [snip] > Signed-off-by: Luigi Rizzo > --- > include/linux/kstats.h | 61 +++++++++ > lib/Kconfig.debug | 7 + > lib/Makefile | 1 + > lib/kstats.c | 303 +++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 372 insertions(+) > create mode 100644 include/linux/kstats.h > create mode 100644 lib/kstats.c > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 69def4a9df009..d581ad075d438 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -1452,6 +1452,13 @@ config LATENCYTOP > Enable this option if you want to use the LatencyTOP tool > to find out which userspace is blocking on what kernel operations. > > +config QUICKSTATS > + tristate "collect percpu metrics and export distributions through debugfs" > + default m Drop the "default m". Add: depends on DEBUG_FS This code should build OK even when CONFIG_DEBUG_FS is not set/enabled, but it seems that it would be useless in that case. > + help > + Helper library to collect percpu kernel metrics, exporting > + distributions through debugfs. See kernel/kstats.c > + > source "kernel/trace/Kconfig" > > config PROVIDE_OHCI1394_DMA_INIT thanks. -- ~Randy