]> git.kaiwu.me - nginx.git/commitdiff
detect L2 cache line size for Intel Core
authorIgor Sysoev <igor@sysoev.ru>
Tue, 29 Jan 2008 07:06:18 +0000 (07:06 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 29 Jan 2008 07:06:18 +0000 (07:06 +0000)
src/core/ngx_cpuinfo.c

index 587f97811bf9c839f43bcc6178750c3506e4bea5..68eb094c9631002a6fe9ba36f79d94865ef1e6ab 100644 (file)
@@ -96,9 +96,18 @@ ngx_cpuinfo(void)
 
         /* Pentium */
         case 5:
+            ngx_cacheline_size = 32;
+            break;
+
         /* Pentium Pro, II, III */
         case 6:
             ngx_cacheline_size = 32;
+
+            if ((cpu[0] & 0xf0) >= 0xd0) {
+                /* Intel Core */
+                ngx_cacheline_size = 64;
+            }
+
             break;
 
         /*