Klaus Demo nginx / 0919207
r2614 merge: update cpuid for Core 2 and Atom Igor Sysoev 13 years ago
1 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
7171 ngx_cpuinfo(void)
7272 {
7373 u_char *vendor;
74 uint32_t vbuf[5], cpu[4];
74 uint32_t vbuf[5], cpu[4], model;
7575
7676 vbuf[0] = 0;
7777 vbuf[1] = 0;
102102 case 6:
103103 ngx_cacheline_size = 32;
104104
105 if ((cpu[0] & 0xf0) >= 0xd0) {
106 /* Intel Core */
105 model = ((cpu[0] & 0xf0000) >> 8) | (cpu[0] & 0xf0);
106
107 if (model >= 0xd0) {
108 /* Intel Core, Core 2, Atom */
107109 ngx_cacheline_size = 64;
108110 }
109111