linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Review][PATCH][0/29] sysctl rewrite for speed and clarity
@ 2012-01-27  4:45 Eric W. Biederman
  2012-01-27  4:49 ` [PATCH 01/29] sysctl: remove impossible condition check Eric W. Biederman
                   ` (58 more replies)
  0 siblings, 59 replies; 76+ messages in thread
From: Eric W. Biederman @ 2012-01-27  4:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fsdevel, netdev, Lucian Adrian Grijincu, Damien Millescamps


The problem:

   The current implementation of sysctl has data structures and semantics
   that are hard to understand, and causes sysctl to run slowly.
   Sysctl running slowly is a scaling problem in general and the network
   stack in particular.

After some heavy testing and way way too much patch rewriting I believe I
have a patchset that seems sane and reasonable and gets to what looks to
my weary eyes a sane result.

My patchset was heavily inspired by the previous work done by Lucian
Grinjincu.  Lucian kept the need for this work alive, and did a much
better job than I ever though he did.  Unfortunately I missed a lot
of the good things Lucian did my rushed attempts at code review.

This code is also available at:
kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl.git

Eric W. Biederman (28):
      sysctl: Consolidate !CONFIG_SYSCTL handling
      sysctl: Register the base sysctl table like any other sysctl table.
      sysctl: Move the implementation into fs/proc/proc_sysctl.c
      sysctl: Make the directories have nlink == 1
      sysctl: Implement retire_sysctl_set
      sysctl: Remove the unnecessary sysctl_set parent concept.
      sysctl: Create local copies of directory names used in paths
      sysctl: Add support for register sysctl tables with a normal cstring path.
      sysctl: Add ctl_table chains into cstring paths
      sysctl: register only tables of sysctl files
      sysctl: Improve the sysctl sanity checks
      sysctl: Remove the now unused ctl_table parent field.
      sysctl: A more obvious version of grab_header.
      sysctl: Initial support for auto-unregistering sysctl tables.
      sysctl: Factor out init_header from __register_sysctl_paths
      sysctl: Factor out insert_header and erase_header
      sysctl: Normalize the root_table data structure.
      sysctl: Rewrite proc_sys_lookup introducing find_entry and lookup_entry.
      sysctl: Rewrite proc_sys_readdir in terms of first_entry and next_entry
      sysctl: Add a root pointer to ctl_table_set
      sysctl: Stop requiring explicit management of sysctl directories
      sysctl: Add sysctl_print_dir and use it in get_subdir
      sysctl: Replace root_list with links between sysctl_table_sets.
      sysctl: Modify __register_sysctl_paths to take a set instead of a root and an nsproxy
      sysctl: Move sysctl_check_dups into insert_header
      sysctl: Make the header lists per directory.
      sysctl: Index sysctl directories with rbtrees.
      sysctl: Add register_sysctl for normal sysctl users

Lucas De Marchi (1):
      sysctl: remove impossible condition check

 fs/proc/internal.h     |    3 +
 fs/proc/proc_sysctl.c  | 1240 +++++++++++++++++++++++++++++++++++++++++++++---
 include/linux/sysctl.h |  106 +++--
 kernel/Makefile        |    1 -
 kernel/sysctl.c        |  501 +-------------------
 kernel/sysctl_check.c  |  160 -------
 lib/Kconfig.debug      |    8 -
 net/sysctl_net.c       |   24 +-
 8 files changed, 1247 insertions(+), 796 deletions(-)


Eric


^ permalink raw reply	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2012-02-02 16:28 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-27  4:45 [Review][PATCH][0/29] sysctl rewrite for speed and clarity Eric W. Biederman
2012-01-27  4:49 ` [PATCH 01/29] sysctl: remove impossible condition check Eric W. Biederman
2012-01-27  4:49 ` [PATCH 02/29] sysctl: Consolidate !CONFIG_SYSCTL handling Eric W. Biederman
2012-01-27  4:49 ` [PATCH 03/29] sysctl: Register the base sysctl table like any other sysctl table Eric W. Biederman
2012-01-27  4:49 ` [PATCH 04/29] sysctl: Move the implementation into fs/proc/proc_sysctl.c Eric W. Biederman
2012-01-27  4:49 ` [PATCH 05/29] sysctl: Make the directories have nlink == 1 Eric W. Biederman
2012-01-27  4:49 ` [PATCH 06/29] sysctl: Implement retire_sysctl_set Eric W. Biederman
2012-01-27  4:49 ` [PATCH 07/29] sysctl: Remove the unnecessary sysctl_set parent concept Eric W. Biederman
2012-01-27  4:49 ` [PATCH 08/29] sysctl: Create local copies of directory names used in paths Eric W. Biederman
2012-01-27  4:49 ` [PATCH 09/29] sysctl: Add support for register sysctl tables with a normal cstring path Eric W. Biederman
2012-01-27  4:49 ` [PATCH 10/29] sysctl: Add ctl_table chains into cstring paths Eric W. Biederman
2012-01-27  4:49 ` [PATCH 11/29] sysctl: register only tables of sysctl files Eric W. Biederman
2012-01-27  4:49 ` [PATCH 12/29] sysctl: Improve the sysctl sanity checks Eric W. Biederman
2012-01-27  4:49 ` [PATCH 13/29] sysctl: Remove the now unused ctl_table parent field Eric W. Biederman
2012-01-27  4:49 ` [PATCH 14/29] sysctl: A more obvious version of grab_header Eric W. Biederman
2012-01-27  4:49 ` [PATCH 15/29] sysctl: Initial support for auto-unregistering sysctl tables Eric W. Biederman
2012-01-27  4:49 ` [PATCH 16/29] sysctl: Factor out init_header from __register_sysctl_paths Eric W. Biederman
2012-01-27  4:49 ` [PATCH 17/29] sysctl: Factor out insert_header and erase_header Eric W. Biederman
2012-01-27  4:49 ` [PATCH 18/29] sysctl: Normalize the root_table data structure Eric W. Biederman
2012-01-27  4:50 ` [PATCH 19/29] sysctl: Rewrite proc_sys_lookup introducing find_entry and lookup_entry Eric W. Biederman
2012-01-27  4:50 ` [PATCH 20/29] sysctl: Rewrite proc_sys_readdir in terms of first_entry and next_entry Eric W. Biederman
2012-01-27  4:50 ` [PATCH 21/29] sysctl: Add a root pointer to ctl_table_set Eric W. Biederman
2012-01-27  4:50 ` [PATCH 22/29] sysctl: Stop requiring explicit management of sysctl directories Eric W. Biederman
2012-01-27  4:50 ` [PATCH 23/29] sysctl: Add sysctl_print_dir and use it in get_subdir Eric W. Biederman
2012-01-27  4:50 ` [PATCH 24/29] sysctl: Replace root_list with links between sysctl_table_sets Eric W. Biederman
2012-01-27  4:50 ` [PATCH 25/29] sysctl: Modify __register_sysctl_paths to take a set instead of a root and an nsproxy Eric W. Biederman
2012-01-27  4:50 ` [PATCH 26/29] sysctl: Move sysctl_check_dups into insert_header Eric W. Biederman
2012-01-27  4:50 ` [PATCH 27/29] sysctl: Make the header lists per directory Eric W. Biederman
2012-01-27  4:50 ` [PATCH 28/29] sysctl: Index sysctl directories with rbtrees Eric W. Biederman
2012-01-27  4:50 ` [PATCH 29/29] sysctl: Add register_sysctl for normal sysctl users Eric W. Biederman
2012-01-27  4:51 ` [PATCH 01/29] sysctl: remove impossible condition check Eric W. Biederman
2012-01-27  4:51 ` [PATCH 02/29] sysctl: Consolidate !CONFIG_SYSCTL handling Eric W. Biederman
2012-01-27  4:51 ` [PATCH 03/29] sysctl: Register the base sysctl table like any other sysctl table Eric W. Biederman
2012-01-27  4:51 ` [PATCH 04/29] sysctl: Move the implementation into fs/proc/proc_sysctl.c Eric W. Biederman
2012-01-27  4:51 ` [PATCH 05/29] sysctl: Make the directories have nlink == 1 Eric W. Biederman
2012-01-27  4:51 ` [PATCH 06/29] sysctl: Implement retire_sysctl_set Eric W. Biederman
2012-01-27  4:51 ` [PATCH 07/29] sysctl: Remove the unnecessary sysctl_set parent concept Eric W. Biederman
2012-01-27  4:51 ` [PATCH 08/29] sysctl: Create local copies of directory names used in paths Eric W. Biederman
2012-01-27  4:51 ` [PATCH 09/29] sysctl: Add support for register sysctl tables with a normal cstring path Eric W. Biederman
2012-01-27  4:51 ` [PATCH 10/29] sysctl: Add ctl_table chains into cstring paths Eric W. Biederman
2012-01-27  4:51 ` [PATCH 11/29] sysctl: register only tables of sysctl files Eric W. Biederman
2012-01-27  4:51 ` [PATCH 12/29] sysctl: Improve the sysctl sanity checks Eric W. Biederman
2012-01-27  4:51 ` [PATCH 13/29] sysctl: Remove the now unused ctl_table parent field Eric W. Biederman
2012-01-27  4:51 ` [PATCH 14/29] sysctl: A more obvious version of grab_header Eric W. Biederman
2012-01-27  4:51 ` [PATCH 15/29] sysctl: Initial support for auto-unregistering sysctl tables Eric W. Biederman
2012-01-27  4:51 ` [PATCH 16/29] sysctl: Factor out init_header from __register_sysctl_paths Eric W. Biederman
2012-01-27  4:51 ` [PATCH 17/29] sysctl: Factor out insert_header and erase_header Eric W. Biederman
2012-01-27  4:51 ` [PATCH 18/29] sysctl: Normalize the root_table data structure Eric W. Biederman
2012-01-29 17:36   ` Lucian Adrian Grijincu
2012-01-30  0:22     ` Eric W. Biederman
2012-01-27  4:51 ` [PATCH 19/29] sysctl: Rewrite proc_sys_lookup introducing find_entry and lookup_entry Eric W. Biederman
2012-01-29 15:49   ` Lucian Adrian Grijincu
2012-01-27  4:51 ` [PATCH 20/29] sysctl: Rewrite proc_sys_readdir in terms of first_entry and next_entry Eric W. Biederman
2012-01-27  4:51 ` [PATCH 21/29] sysctl: Add a root pointer to ctl_table_set Eric W. Biederman
2012-01-29 17:19   ` Lucian Adrian Grijincu
2012-01-27  4:51 ` [PATCH 22/29] sysctl: Stop requiring explicit management of sysctl directories Eric W. Biederman
2012-01-29 19:31   ` Lucian Adrian Grijincu
2012-01-31  4:45     ` Eric W. Biederman
2012-01-27  4:51 ` [PATCH 23/29] sysctl: Add sysctl_print_dir and use it in get_subdir Eric W. Biederman
2012-01-27  4:52 ` [PATCH 24/29] sysctl: Replace root_list with links between sysctl_table_sets Eric W. Biederman
2012-01-30  0:01   ` Lucian Adrian Grijincu
2012-01-31  3:10     ` Eric W. Biederman
2012-01-30 17:51   ` Dave Jones
2012-01-31  2:11     ` Eric W. Biederman
2012-01-31  2:13       ` Joe Perches
2012-01-27  4:52 ` [PATCH 25/29] sysctl: Modify __register_sysctl_paths to take a set instead of a root and an nsproxy Eric W. Biederman
2012-01-27  4:52 ` [PATCH 26/29] sysctl: Move sysctl_check_dups into insert_header Eric W. Biederman
2012-01-27  4:52 ` [PATCH 27/29] sysctl: Make the header lists per directory Eric W. Biederman
2012-01-27  4:52 ` [PATCH 28/29] sysctl: Index sysctl directories with rbtrees Eric W. Biederman
2012-01-27  4:52 ` [PATCH 29/29] sysctl: Add register_sysctl for normal sysctl users Eric W. Biederman
2012-02-02  3:27 ` [Review][PATCH][0/4] sysctl bitty fixes Eric W. Biederman
2012-02-02  3:28   ` [PATCH 1/4] sysctl: An easier to read version of find_subdir Eric W. Biederman
2012-02-02  3:29   ` [PATCH 2/4] sysctl: Correct error return from get_subdir Eric W. Biederman
2012-02-02  3:29   ` [PATCH 3/4] sysctl: Comments to make the code clearer Eric W. Biederman
2012-02-02 16:28     ` Ben Hutchings
2012-02-02  3:30   ` [PATCH 4/4] sysctl: Don't call sysctl_follow_link unless we are a link Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).