linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: jpoimboe@kernel.org, kent.overstreet@linux.dev,
	peterz@infradead.org, nphamcs@gmail.com,
	cerasuolodomenico@gmail.com, surenb@google.com,
	lizhijian@fujitsu.com, willy@infradead.org,
	shakeel.butt@linux.dev, vbabka@suse.cz, ziy@nvidia.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v4] vmstat: Kernel stack usage histogram
Date: Tue, 23 Jul 2024 23:46:00 -0700	[thread overview]
Message-ID: <20240723234600.d05817293ec1eb2d4ad87be7@linux-foundation.org> (raw)
In-Reply-To: <20240718202611.1695164-1-pasha.tatashin@soleen.com>

On Thu, 18 Jul 2024 20:26:11 +0000 Pasha Tatashin <pasha.tatashin@soleen.com> wrote:

> As part of the dynamic kernel stack project, we need to know the amount
> of data that can be saved by reducing the default kernel stack size [1].
> 
> Provide a kernel stack usage histogram to aid in optimizing kernel stack
> sizes and minimizing memory waste in large-scale environments. The
> histogram divides stack usage into power-of-two buckets and reports the
> results in /proc/vmstat. This information is especially valuable in
> environments with millions of machines, where even small optimizations
> can have a significant impact.

x86_64 allmodconfig:

In file included from <command-line>:
In function 'init_memcg_events',
    inlined from 'mem_cgroup_css_alloc' at mm/memcontrol.c:3616:3:
././include/linux/compiler_types.h:510:45: error: call to '__compiletime_assert_2305' declared with attribute error: BUILD_BUG_ON failed: NR_VM_EVENT_ITEMS >= S8_MAX
  510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      |                                             ^
././include/linux/compiler_types.h:491:25: note: in definition of macro '__compiletime_assert'
  491 |                         prefix ## suffix();                             \
      |                         ^~~~~~
././include/linux/compiler_types.h:510:9: note: in expansion of macro '_compiletime_assert'
  510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
      |         ^~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
   39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
      |                                     ^~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
   50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
      |         ^~~~~~~~~~~~~~~~
mm/memcontrol.c:444:9: note: in expansion of macro 'BUILD_BUG_ON'
  444 |         BUILD_BUG_ON(NR_VM_EVENT_ITEMS >= S8_MAX);
      |         ^~~~~~~~~~~~

This looks legitimate - is it time to switch to int16_t?


  parent reply	other threads:[~2024-07-24  6:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 20:26 Pasha Tatashin
2024-07-18 21:44 ` Kent Overstreet
2024-07-18 23:36 ` Shakeel Butt
2024-07-19  2:55   ` Pasha Tatashin
2024-07-19 22:04     ` Shakeel Butt
2024-07-24  0:09       ` Andrew Morton
2024-07-24  0:10     ` Andrew Morton
2024-07-24  6:46 ` Andrew Morton [this message]
2024-07-24 14:43   ` Pasha Tatashin
2024-07-24 16:59     ` Shakeel Butt

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=20240723234600.d05817293ec1eb2d4ad87be7@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cerasuolodomenico@gmail.com \
    --cc=jpoimboe@kernel.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizhijian@fujitsu.com \
    --cc=nphamcs@gmail.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=peterz@infradead.org \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox