From: Damien Millescamps <damien.millescamps@6wind.com>
To: netdev@vger.kernel.org
Cc: "Eric W . Biederman" <ebiederm@xmission.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Octavian Purdila <tavi@cs.pub.ro>,
"David S . Miller" <davem@davemloft.net>,
Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: v6: faster tree-based sysctl implementation
Date: Tue, 06 Dec 2011 17:47:09 +0100 [thread overview]
Message-ID: <4EDE470D.3070808@6wind.com> (raw)
In-Reply-To: <CAPLs8y8vhioqc3CPrD7ugmVkR2DjKWNm8+T5j9QQnrxi=BgvdA@mail.gmail.com>
On 12/06/2011 03:33 PM, Lucian Adrian Grijincu wrote:
> On Tue, Dec 6, 2011 at 4:11 PM, Anca Emanuel<anca.emanuel@gmail.com> wrote:
>> time modprobe dummy numdummies=1000FATAL: Error inserting dummy
>> (/lib/modules/3.2.0-3-generic/kernel/drivers/net/dummy.ko): Operation
>> not permitted
> Generally when you get "Operation not permitted" you should try with sudo.
> This is the man-page: http://xkcd.com/149/ :)
>
>
>> What are the practical problems you solve with this ?
>> Name one or more.
>
> Sysctl uses a slow algorithm: O(N^2) for insertions, O(N) for lookup,
> with a relatively big constant.
> The performance is acceptable when N is small, but sometimes it can
> grow to bigger values.
> One case where N can grow to very large values is when you add network
> interfaces.
>
> Some companies (like IXIACOM which sponsored this work at the
> beginning of this year) have use-cases in which they need 10^3..10^6
> network interfaces. The current sysctl implementation is unacceptable
> for them.
>
> @Damien Millescamps might have some input on where he needs better
> sysctl performance as he prompted me to re-send this patch series.
>
> This algorithm is O(N * logN) for insert and O(logN) for lookup.
>
>
A use-case for wanting to be able to create several interfaces is to
have a "tunnel" server handling several dynamic point to point connections.
The current implementation dates from the "sysctl cleanup" from Al Viro:
commits 734550921e9b7ab924a43aa3d0bd4239dac4fbf1 to
ae7edecc9b8810770a8e5cb9a466ea4bdcfa8401, plus some later fixes.
This implementation was suboptimal, and modifying it necessitates a lot
of reworking of the structures used, so the diff is clearly big. Also
Lucian took time to add lots of comment to help understanding and using
the new implementation, which also explains the amount of modifications
in kernel/sysctl.c
For information, the main idea is to implement sysctl, which has a
filesystem structure, like most other file system implementation (like
sysfs), i.e. using an rb_tree.
--
damien
next prev parent reply other threads:[~2011-12-06 16:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 7:55 v6: faster tree-based sysctl implementation Lucian Adrian Grijincu
2011-12-06 14:11 ` Anca Emanuel
2011-12-06 14:33 ` Lucian Adrian Grijincu
2011-12-06 16:47 ` Damien Millescamps [this message]
2011-12-06 18:42 ` Benjamin LaHaise
2011-12-06 23:42 ` Anca Emanuel
2011-12-07 0:08 ` Anca Emanuel
2011-12-07 1:44 ` Lucian Adrian Grijincu
2011-12-08 0:19 ` Eric W. Biederman
2011-12-16 8:15 ` Eric W. Biederman
2011-12-18 8:05 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EDE470D.3070808@6wind.com \
--to=damien.millescamps@6wind.com \
--cc=adobriyan@gmail.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tavi@cs.pub.ro \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).