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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <p73k5mkqmrx.fsf@bingen.suse.de>
Date:	Tue, 08 Jan 2008 17:56:18 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	Changli Gao <xiaosuo@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Improve scalability of epoll_ctl

Changli Gao <xiaosuo@...il.com> writes:

> 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.

Numbers, numbers, numbers on the improvement missing? 

> +	if (size < PAGE_SIZE / sizeof(struct epitem*)) {
> +		ep->epi_array = kmalloc(msize, GFP_KERNEL);
> +		ep->epi_array_size = size;
> +	} else {
> +		msize = PAGE_ALIGN(msize);
> +		ep->epi_array = vmalloc(msize);

Are you sure it's faster? vmalloc/vfree can be quite slow because
they have to change the MMU state of the kernel and take global
locks. 

The other problem is that on 32bit systems vmalloc space is somewhat
limited -- you might have added an unintended scaling limit.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ