Messages in this thread | | | Date | Wed, 7 Dec 2011 01:42:58 +0200 | Subject | Re: v6: faster tree-based sysctl implementation | From | Anca Emanuel <> |
| |
On Tue, Dec 6, 2011 at 4:33 PM, Lucian Adrian Grijincu <lucian.grijincu@gmail.com> 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.
| |