Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447AbdGGIQF (ORCPT ); Fri, 7 Jul 2017 04:16:05 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:34291 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752104AbdGGIQD (ORCPT ); Fri, 7 Jul 2017 04:16:03 -0400 MIME-Version: 1.0 In-Reply-To: <20170619232832.27116-4-dennisz@fb.com> References: <20170619232832.27116-1-dennisz@fb.com> <20170619232832.27116-4-dennisz@fb.com> From: Geert Uytterhoeven Date: Fri, 7 Jul 2017 10:16:01 +0200 X-Google-Sender-Auth: 1Hb6OyGiWBEQacMicysWxDO2by4 Message-ID: Subject: Re: [PATCH 3/4] percpu: expose statistics about percpu memory via debugfs To: Dennis Zhou Cc: Tejun Heo , Christoph Lameter , Linux MM , "linux-kernel@vger.kernel.org" , kernel-team@fb.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1894 Lines: 56 Hi Dennis, On Tue, Jun 20, 2017 at 1:28 AM, Dennis Zhou wrote: > There is limited visibility into the use of percpu memory leaving us > unable to reason about correctness of parameters and overall use of > percpu memory. These counters and statistics aim to help understand > basic statistics about percpu memory such as number of allocations over > the lifetime, allocation sizes, and fragmentation. > > New Config: PERCPU_STATS > > Signed-off-by: Dennis Zhou > --- > mm/Kconfig | 8 ++ > mm/Makefile | 1 + > mm/percpu-internal.h | 131 ++++++++++++++++++++++++++++++ > mm/percpu-km.c | 4 + > mm/percpu-stats.c | 222 +++++++++++++++++++++++++++++++++++++++++++++++++++ > mm/percpu-vm.c | 5 ++ > mm/percpu.c | 9 +++ > 7 files changed, 380 insertions(+) > create mode 100644 mm/percpu-stats.c > > diff --git a/mm/Kconfig b/mm/Kconfig > index beb7a45..8fae426 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -706,3 +706,11 @@ config ARCH_USES_HIGH_VMA_FLAGS > bool > config ARCH_HAS_PKEYS > bool > + > +config PERCPU_STATS > + bool "Collect percpu memory statistics" > + default n > + help > + This feature collects and exposes statistics via debugfs. The > + information includes global and per chunk statistics, which can > + be used to help understand percpu memory usage. Just wondering: does this option make sense to enable on !SMP? If not, you may want to make it depend on SMP. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds