All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Dennis Zhou <dennisz@fb.com>
Cc: Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>,
	Linux MM <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kernel-team@fb.com
Subject: Re: [PATCH 3/4] percpu: expose statistics about percpu memory via debugfs
Date: Fri, 7 Jul 2017 10:16:01 +0200	[thread overview]
Message-ID: <CAMuHMdWXR7tN01PArsSA5nwZV1GF=YgNdZuSeNq_ri1GoYSKCQ@mail.gmail.com> (raw)
In-Reply-To: <20170619232832.27116-4-dennisz@fb.com>

Hi Dennis,

On Tue, Jun 20, 2017 at 1:28 AM, Dennis Zhou <dennisz@fb.com> 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 <dennisz@fb.com>
> ---
>  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

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Dennis Zhou <dennisz@fb.com>
Cc: Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>,
	Linux MM <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kernel-team@fb.com
Subject: Re: [PATCH 3/4] percpu: expose statistics about percpu memory via debugfs
Date: Fri, 7 Jul 2017 10:16:01 +0200	[thread overview]
Message-ID: <CAMuHMdWXR7tN01PArsSA5nwZV1GF=YgNdZuSeNq_ri1GoYSKCQ@mail.gmail.com> (raw)
In-Reply-To: <20170619232832.27116-4-dennisz@fb.com>

Hi Dennis,

On Tue, Jun 20, 2017 at 1:28 AM, Dennis Zhou <dennisz@fb.com> 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 <dennisz@fb.com>
> ---
>  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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-07-07  8:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 23:28 [PATCH 0/4] percpu: add basic stats and tracepoints to percpu allocator Dennis Zhou
2017-06-19 23:28 ` Dennis Zhou
2017-06-19 23:28 ` [PATCH 1/4] percpu: add missing lockdep_assert_held to func pcpu_free_area Dennis Zhou
2017-06-19 23:28   ` Dennis Zhou
2017-06-19 23:28 ` [PATCH 2/4] percpu: migrate percpu data structures to internal header Dennis Zhou
2017-06-19 23:28   ` Dennis Zhou
2017-06-19 23:28 ` [PATCH 3/4] percpu: expose statistics about percpu memory via debugfs Dennis Zhou
2017-06-19 23:28   ` Dennis Zhou
2017-07-07  8:16   ` Geert Uytterhoeven [this message]
2017-07-07  8:16     ` Geert Uytterhoeven
2017-07-08 20:33     ` Dennis Zhou
2017-07-08 20:33       ` Dennis Zhou
2017-06-19 23:28 ` [PATCH 4/4] percpu: add tracepoint support for percpu memory Dennis Zhou
2017-06-19 23:28   ` Dennis Zhou
2017-06-21 16:18   ` Levin, Alexander (Sasha Levin)
2017-06-21 16:18     ` Levin, Alexander (Sasha Levin)
2017-06-21 17:52     ` [PATCH 1/1] percpu: fix early calls for spinlock in pcpu_stats Dennis Zhou
2017-06-21 17:52       ` Dennis Zhou
2017-06-21 17:54       ` Tejun Heo
2017-06-21 17:54         ` Tejun Heo
2017-06-20 17:45 ` [PATCH 0/4] percpu: add basic stats and tracepoints to percpu allocator Tejun Heo
2017-06-20 17:45   ` Tejun Heo
2017-06-20 19:12   ` Dennis Zhou
2017-06-20 19:32     ` Tejun Heo
2017-06-20 19:32       ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdWXR7tN01PArsSA5nwZV1GF=YgNdZuSeNq_ri1GoYSKCQ@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=cl@linux.com \
    --cc=dennisz@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.