summaryrefslogtreecommitdiffstats
path: root/Kconfig
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-09 17:24:30 -0800
committerEric W. Biederman <ebiederm@xmission.com>2012-01-24 16:40:30 -0800
commitac13ac6f4c6c0504d2c927862216f4e422a2c0b5 (patch)
tree87d0d698e79b911428b8f8e2f357a27f74c854f9 /Kconfig
parent9e3d47df35abd6430fed04fb40a76c7358b1e815 (diff)
downloadop-kernel-dev-ac13ac6f4c6c0504d2c927862216f4e422a2c0b5.zip
op-kernel-dev-ac13ac6f4c6c0504d2c927862216f4e422a2c0b5.tar.gz
sysctl: Index sysctl directories with rbtrees.
One of the most important jobs of sysctl is to export network stack tunables. Several of those tunables are per network device. In several instances people are running with 1000+ network devices in there network stacks, which makes the simple per directory linked list in sysctl a scaling bottleneck. Replace O(N^2) sysctl insertion and lookup times with O(NlogN) by using an rbtree to index the sysctl directories. Benchmark before: make-dummies 0 999 -> 0.32s rmmod dummy -> 0.12s make-dummies 0 9999 -> 1m17s rmmod dummy -> 17s Benchmark after: make-dummies 0 999 -> 0.074s rmmod dummy -> 0.070s make-dummies 0 9999 -> 3.4s rmmod dummy -> 0.44s Benchmark after (without dev_snmp6): make-dummies 0 9999 -> 0.75s rmmod dummy -> 0.44s make-dummies 0 99999 -> 11s rmmod dummy -> 4.3s At 10,000 dummy devices the bottleneck becomes the time to add and remove the files under /proc/sys/net/dev_snmp6. I have commented out the code that adds and removes files under /proc/sys/net/dev_snmp6 and taken measurments of creating and destroying 100,000 dummies to verify the sysctl continues to scale. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud