Mercurial > hg > nginx-quic
changeset 2863:dc2c80240b1d stable-0.6
r2614 merge:
update cpuid for Core 2 and Atom
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 18 May 2009 16:02:06 +0000 |
parents | 62c95a6b143b |
children | 967ad993a4f8 |
files | src/core/ngx_cpuinfo.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_cpuinfo.c +++ b/src/core/ngx_cpuinfo.c @@ -72,7 +72,7 @@ void ngx_cpuinfo(void) { u_char *vendor; - uint32_t vbuf[5], cpu[4]; + uint32_t vbuf[5], cpu[4], model; vbuf[0] = 0; vbuf[1] = 0; @@ -103,8 +103,10 @@ ngx_cpuinfo(void) case 6: ngx_cacheline_size = 32; - if ((cpu[0] & 0xf0) >= 0xd0) { - /* Intel Core */ + model = ((cpu[0] & 0xf0000) >> 8) | (cpu[0] & 0xf0); + + if (model >= 0xd0) { + /* Intel Core, Core 2, Atom */ ngx_cacheline_size = 64; }