mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
sysctl: Make the header lists per directory.
Slightly enhance efficiency and clarity of the code by making the header list per directory instead of per set. Benchmark before: make-dummies 0 999 -> 0.63s rmmod dummy -> 0.12s make-dummies 0 9999 -> 2m35s rmmod dummy -> 18s Benchmark after: make-dummies 0 999 -> 0.32s rmmod dummy -> 0.12s make-dummies 0 9999 -> 1m17s rmmod dummy -> 17s Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
This commit is contained in:
parent
e54012cede
commit
9e3d47df35
2 changed files with 12 additions and 18 deletions
|
@ -1047,10 +1047,10 @@ struct ctl_table_header
|
|||
struct ctl_dir {
|
||||
/* Header must be at the start of ctl_dir */
|
||||
struct ctl_table_header header;
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
struct ctl_table_set {
|
||||
struct list_head list;
|
||||
int (*is_seen)(struct ctl_table_set *);
|
||||
struct ctl_dir dir;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue