mirror of
https://github.com/nginx/nginx.git
synced 2025-02-16 18:14:51 -06:00
update cpuid for Core 2 and Atom
This commit is contained in:
parent
2766157b02
commit
7c6c186a7e
@ -72,7 +72,7 @@ void
|
|||||||
ngx_cpuinfo(void)
|
ngx_cpuinfo(void)
|
||||||
{
|
{
|
||||||
u_char *vendor;
|
u_char *vendor;
|
||||||
uint32_t vbuf[5], cpu[4];
|
uint32_t vbuf[5], cpu[4], model;
|
||||||
|
|
||||||
vbuf[0] = 0;
|
vbuf[0] = 0;
|
||||||
vbuf[1] = 0;
|
vbuf[1] = 0;
|
||||||
@ -103,8 +103,10 @@ ngx_cpuinfo(void)
|
|||||||
case 6:
|
case 6:
|
||||||
ngx_cacheline_size = 32;
|
ngx_cacheline_size = 32;
|
||||||
|
|
||||||
if ((cpu[0] & 0xf0) >= 0xd0) {
|
model = ((cpu[0] & 0xf0000) >> 8) | (cpu[0] & 0xf0);
|
||||||
/* Intel Core */
|
|
||||||
|
if (model >= 0xd0) {
|
||||||
|
/* Intel Core, Core 2, Atom */
|
||||||
ngx_cacheline_size = 64;
|
ngx_cacheline_size = 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user