Re: v6: faster tree-based sysctl implementation

From: Anca Emanuel
Date: Tue Dec 06 2011 - 18:43:09 EST


On Tue, Dec 6, 2011 at 4:33 PM, Lucian Adrian Grijincu
<lucian.grijincu@xxxxxxxxx> wrote:
> 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.
>
[snip]
>
> This algorithm is O(N * logN) for insert and O(logN) for lookup.
>
>
>> You add more code. This is not good. If you reduce the code, then it
>> will be interesting.
>
> Thank you. I know that, but it's easier said than done. I'd welcome
> some feedback in what could be simplified in my patches :)

>From an "airplane view" you can make the algorithms generic, and find
other places in kernel that can use them.
If you do that, I am sure you will get the attention.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/