Welcome! Log In Create A New Profile

Advanced

Re: Is this a bug?

Maxim Dounin
August 18, 2012 07:20PM
Hello!

On Sat, Aug 18, 2012 at 09:23:47AM -0400, lenky0401 wrote:

> 45: /*
> 46: * Preallocation of first nodes : 0, 1, 00, 01, 10, 11, 000, 001,
> etc.
> 47: * increases TLB hits even if for first lookup iterations.
> 48: * On 32-bit platforms the 7 preallocated bits takes continuous 4K,
> 49: * 8 - 8K, 9 - 16K, etc. On 64-bit platforms the 6 preallocated
> bits
> 50: * takes continuous 4K, 7 - 8K, 8 - 16K, etc. There is no sense to
> 51: * to preallocate more than one page, because further preallocation
> 52: * distributes the only bit per page. Instead, a random insertion
> 53: * may distribute several bits per page.
> 54: *
> 55: * Thus, by default we preallocate maximum
> 56: * 6 bits on amd64 (64-bit platform and 4K pages)
> 57: * 7 bits on i386 (32-bit platform and 4K pages)
> 58: * 7 bits on sparc64 in 64-bit mode (8K pages)
> 59: * 8 bits on sparc64 in 32-bit mode (8K pages)
> 60: */
> 61:
> 62: if (preallocate == -1) {
> 63: switch (ngx_pagesize / sizeof(ngx_radix_tree_t)) {
> //ngx_radix_tree_t -> ngx_radix_node_t ?
>
> Thanks in advance.

Sure. Thanks for spotting this, fix committed:

http://trac.nginx.org/nginx/changeset/4824/nginx

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Is this a bug?

lenky0401 August 18, 2012 09:23AM

Re: Is this a bug?

Maxim Dounin August 18, 2012 07:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready