lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 8 Jan 2008 12:30:58 -0800 (PST) From: Davide Libenzi <davidel@...ilserver.org> To: Eric Dumazet <dada1@...mosbay.com> cc: Changli Gao <xiaosuo@...il.com>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] Improve scalability of epoll_ctl On Tue, 8 Jan 2008, Eric Dumazet wrote: > Changli Gao a écrit : > > Replace the epitem rbtree with a dynamic array to get the constant insertion/deletion/modification time of the file descriptors. Reuse the size argument of epoll_create, however the size must be smaller than the max file descriptor number: ether the resource limitation or the compiling time limitation. > > > > > Hum, you should read this : > > http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.7-rc3/2.6.7-rc3-mm2/broken-out/epoll-uses-rbtrees.patch > > > Your patch is a revert of this change, it probably wont be accepted. > > epoll_ctl() is scalable, since it's O(log2(N)) : With 1 millions files > descriptors, that means less than 20 nodes to lookup in the tree. Indeed, and we aren't going back. > In what situation do you think epoll_ctl() performance is bad ? I'm sure you can cook up a microbench that only does epoll_ctl(), and with a good hash implementation you get better numbers. This is what I did before I changed to rbtree, and the numbers did not justify the code (the "size" in epoll_create() is just an hint, and that means you need to handle resizing - plus other things like locking up memory when the number of fds shrinks, and other stuff I don't even remember). - Davide
Powered by blists - more mailing lists