Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1347857

Re: [PATCH v5 5/5] lib/percpu-list: Add a config parameter for disabling per-cpu list

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v5 5/5] lib/percpu-list: Add a config parameter for disabling per-cpu list
Date 2016-03-02 09:50 +0100
Message-ID <r8aDL-5aW-13@gated-at.bofh.it> (permalink)
References <r7ZIm-6hp-7@gated-at.bofh.it> <r7ZIm-6hp-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Waiman Long <Waiman.Long@hpe.com> wrote:

> As there is concern that the larger pcpu_list_node structure and the
> per-cpu overhead may be a waste of resource on small system. This patch
> adds a config parameter CONFIG_PERCPU_LIST to disable the per-cpu list
> if the kernel builder chooses to do so. With per-cpu list disabled,
> all the different groups of per-cpu lists will be degenerated into
> global lists for all the CPUs.
> 
> The current default is to enable per-cpu list. A kernel builder needs
> to explicitly turn it off.
> 
> Signed-off-by: Waiman Long <Waiman.Long@hpe.com>
> ---
>  fs/inode.c                  |    2 +-
>  include/linux/percpu-list.h |   93 ++++++++++++++++++++++++++++++++++++++++++-
>  lib/Kconfig                 |   14 ++++++
>  lib/percpu-list.c           |   24 +++++++++++-
>  4 files changed, 130 insertions(+), 3 deletions(-)

I think this kind of #ifdef complexity and the doubling of our Kconfig and testing 
space is counterproductive, and I think the per CPU locking is a win on as small 
as dual core CPUs, and on UP CPUs the per CPU list becomes a single global list 
automatically.

I'm not against visible memory savings for overly clever scalability features, but 
this does not appear to be such a case, so:

NAKed-by: Ingo Molnar <mingo@kernel.org>

Thanks,

	Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 0/5] vfs: Use per-cpu list for SB's s_inodes list Waiman Long <Waiman.Long@hpe.com> - 2016-03-01 22:10 +0100
  [PATCH v5 3/5] vfs: Remove unnecessary list_for_each_entry_safe() variants Waiman Long <Waiman.Long@hpe.com> - 2016-03-01 22:10 +0100
  [PATCH v5 4/5] vfs: Use per-cpu list for superblock's inode list Waiman Long <Waiman.Long@hpe.com> - 2016-03-01 22:10 +0100
  [PATCH v5 1/5] lib/percpu-list: Per-cpu list with associated per-cpu locks Waiman Long <Waiman.Long@hpe.com> - 2016-03-01 22:10 +0100
  [PATCH v5 5/5] lib/percpu-list: Add a config parameter for disabling per-cpu list Waiman Long <Waiman.Long@hpe.com> - 2016-03-01 22:10 +0100
    Re: [PATCH v5 5/5] lib/percpu-list: Add a config parameter for  disabling per-cpu list Ingo Molnar <mingo@kernel.org> - 2016-03-02 09:50 +0100
      Re: [PATCH v5 5/5] lib/percpu-list: Add a config parameter for disabling  per-cpu list Waiman Long <waiman.long@hpe.com> - 2016-03-02 23:00 +0100
  Re: [PATCH v5 0/5] vfs: Use per-cpu list for SB's s_inodes list Jan Kara <jack@suse.cz> - 2016-03-03 11:50 +0100

csiph-web