sysctl rewrite for speed and clarity
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest29 patches 12 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/29 | sysctl: remove impossible condition checkfs/ | +2 | 0 replies | |
| 1/29 | sysctl: remove impossible condition checkfs/ | +2 | 0 replies | |
| 2/29 | sysctl: Consolidate !CONFIG_SYSCTL handlinginclude/ kernel/ | +62 | 0 replies | |
| 2/29 | sysctl: Consolidate !CONFIG_SYSCTL handlinginclude/ kernel/ | +62 | 0 replies | |
| 3/29 | sysctl: Register the base sysctl table like any other sysctl table.fs/ include/ kernel/ +1 more | +9 | 0 replies | |
| 3/29 | sysctl: Register the base sysctl table like any other sysctl table.fs/ include/ kernel/ +1 more | +9 | 0 replies | |
| 4/29 | sysctl: Move the implementation into fs/proc/proc_sysctl.cfs/ fs/ include/ +3 more | +625 | 0 replies | |
| 4/29 | sysctl: Move the implementation into fs/proc/proc_sysctl.cfs/ fs/ include/ +3 more | +625 | 0 replies | |
| 5/29 | sysctl: Make the directories have nlink == 1fs/ | +0 | 0 replies | |
| 5/29 | sysctl: Make the directories have nlink == 1fs/ | +0 | 0 replies | |
| 6/29 | sysctl: Implement retire_sysctl_setfs/ include/ net/ | +6 | 0 replies | |
| 6/29 | sysctl: Implement retire_sysctl_setfs/ include/ net/ | +6 | 0 replies | |
| 7/29 | sysctl: Remove the unnecessary sysctl_set parent concept.fs/ include/ net/ | +10 | 0 replies | |
| 7/29 | sysctl: Remove the unnecessary sysctl_set parent concept.fs/ include/ net/ | +10 | 0 replies | |
| 8/29 | sysctl: Create local copies of directory names used in pathsfs/ | +8 | 0 replies | |
| 8/29 | sysctl: Create local copies of directory names used in pathsfs/ | +8 | 0 replies | |
| 9/29 | sysctl: Add support for register sysctl tables with a normal cstring path.fs/ include/ | +87 | 0 replies | |
| 9/29 | sysctl: Add support for register sysctl tables with a normal cstring path.fs/ include/ | +87 | 0 replies | |
| 10/29 | sysctl: Add ctl_table chains into cstring pathsfs/ | +9 | 0 replies | |
| 10/29 | sysctl: Add ctl_table chains into cstring pathsfs/ | +9 | 0 replies | |
| 11/29 | sysctl: register only tables of sysctl filesfs/ include/ | +148 | 0 replies | |
| 11/29 | sysctl: register only tables of sysctl filesfs/ include/ | +148 | 0 replies | |
| 12/29 | sysctl: Improve the sysctl sanity checksfs/ lib/ | +86 | 0 replies | |
| 12/29 | sysctl: Improve the sysctl sanity checksfs/ lib/ | +86 | 0 replies | |
| 13/29 | sysctl: Remove the now unused ctl_table parent field.fs/ include/ | +1 | 0 replies | |
| 13/29 | sysctl: Remove the now unused ctl_table parent field.fs/ include/ | +1 | 0 replies | |
| 14/29 | sysctl: A more obvious version of grab_header.fs/ | +4 | 0 replies | |
| 14/29 | sysctl: A more obvious version of grab_header.fs/ | +4 | 0 replies | |
| 15/29 | sysctl: Initial support for auto-unregistering sysctl tables.fs/ include/ | +20 | 0 replies | |
| 15/29 | sysctl: Initial support for auto-unregistering sysctl tables.fs/ include/ | +20 | 0 replies | |
| 16/29 | sysctl: Factor out init_header from __register_sysctl_pathsfs/ | +17 | 0 replies | |
| 16/29 | sysctl: Factor out init_header from __register_sysctl_pathsfs/ | +17 | 0 replies | |
| 17/29 | sysctl: Factor out insert_header and erase_headerfs/ | +13 | 0 replies | |
| 17/29 | sysctl: Factor out insert_header and erase_headerfs/ | +13 | 0 replies | |
| 18/29 | sysctl: Normalize the root_table data structure.fs/ | +11 | 0 replies | |
| 18/29 | sysctl: Normalize the root_table data structure.fs/ | +11 | 2 replies | |
| 19/29 | sysctl: Rewrite proc_sys_lookup introducing find_entry and lookup_entry.fs/ | +76 | 0 replies | |
| 19/29 | sysctl: Rewrite proc_sys_lookup introducing find_entry and lookup_entry.fs/ | +76 | 1 reply | |
| 20/29 | sysctl: Rewrite proc_sys_readdir in terms of first_entry and next_entryfs/ | +62 | 0 replies | |
| 20/29 | sysctl: Rewrite proc_sys_readdir in terms of first_entry and next_entryfs/ | +62 | 0 replies | |
| 21/29 | sysctl: Add a root pointer to ctl_table_setfs/ include/ net/ | +8 | 0 replies | |
| 21/29 | sysctl: Add a root pointer to ctl_table_setfs/ include/ net/ | +8 | 1 reply | |
| 22/29 | sysctl: Stop requiring explicit management of sysctl directoriesfs/ include/ | +150 | 0 replies | |
| 22/29 | sysctl: Stop requiring explicit management of sysctl directoriesfs/ include/ | +150 | 2 replies | |
| 23/29 | sysctl: Add sysctl_print_dir and use it in get_subdirfs/ | +10 | 0 replies | |
| 23/29 | sysctl: Add sysctl_print_dir and use it in get_subdirfs/ | +10 | 0 replies | |
| 24/29 | sysctl: Replace root_list with links between sysctl_table_sets.fs/ include/ | +296 | 0 replies | |
| 24/29 | sysctl: Replace root_list with links between sysctl_table_sets.fs/ include/ | +296 | 5 replies | |
| 25/29 | sysctl: Modify __register_sysctl_paths to take a set instead of a root and an nsproxyfs/ include/ net/ | +17 | 0 replies | |
| 25/29 | sysctl: Modify __register_sysctl_paths to take a set instead of a root and an nsproxyfs/ include/ net/ | +17 | 0 replies | |
| 26/29 | sysctl: Move sysctl_check_dups into insert_headerfs/ | +11 | 0 replies | |
| 26/29 | sysctl: Move sysctl_check_dups into insert_headerfs/ | +11 | 0 replies | |
| 27/29 | sysctl: Make the header lists per directory.fs/ include/ | +12 | 0 replies | |
| 27/29 | sysctl: Make the header lists per directory.fs/ include/ | +12 | 0 replies | |
| 28/29 | sysctl: Index sysctl directories with rbtrees.fs/ include/ | +142 | 0 replies | |
| 28/29 | sysctl: Index sysctl directories with rbtrees.fs/ include/ | +142 | 0 replies | |
| 29/29 | sysctl: Add register_sysctl for normal sysctl usersfs/ include/ | +18 | 0 replies | |
| 29/29 | sysctl: Add register_sysctl for normal sysctl usersfs/ include/ | +18 | 0 replies |
Reviews trailers per patch
2 of 58 patches have a Reviewed-by or Acked-by.
| Patch | Jesper Juhl | Lucian Adrian Grijincu |
|---|---|---|
| 1/29 | R-b R-b | |
| 1/29 | R-b R-b | |
| 2/29 | ||
| 2/29 | ||
| 3/29 | ||
| 3/29 | ||
| 4/29 | ||
| 4/29 | ||
| 5/29 | ||
| 5/29 | ||
| 6/29 | ||
| 6/29 | ||
| 7/29 | ||
| 7/29 | ||
| 8/29 | ||
| 8/29 | ||
| 9/29 | ||
| 9/29 | ||
| 10/29 | ||
| 10/29 | ||
| 11/29 | Inspired-by Inspired-by | |
| 11/29 | Inspired-by Inspired-by | |
| 12/29 | ||
| 12/29 | ||
| 13/29 | Inspired-by Inspired-by | |
| 13/29 | Inspired-by Inspired-by | |
| 14/29 | ||
| 14/29 | ||
| 15/29 | ||
| 15/29 | ||
| 16/29 | ||
| 16/29 | ||
| 17/29 | ||
| 17/29 | ||
| 18/29 | ||
| 18/29 | ||
| 19/29 | ||
| 19/29 | ||
| 20/29 | ||
| 20/29 | ||
| 21/29 | ||
| 21/29 | ||
| 22/29 | ||
| 22/29 | ||
| 23/29 | ||
| 23/29 | ||
| 24/29 | ||
| 24/29 | ||
| 25/29 | ||
| 25/29 | ||
| 26/29 | ||
| 26/29 | ||
| 27/29 | ||
| 27/29 | ||
| 28/29 | ||
| 28/29 | ||
| 29/29 | ||
| 29/29 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Review][PATCH][0/29] sysctl rewrite for speed and clarity
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