Mercurial > hg > nginx
changeset 2613:b863be280d3b
update cpuid for Core 2 and Atom
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 28 Mar 2009 12:43:41 +0000 |
parents | 038dc63b657a |
children | 02fb50962b11 |
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 Fri Mar 27 19:32:55 2009 +0000 +++ b/src/core/ngx_cpuinfo.c Sat Mar 28 12:43:41 2009 +0000 @@ -72,7 +72,7 @@ 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 @@ 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; }