changeset 1872:8e88522cb6da

detect L2 cache line size for Intel Core
author Igor Sysoev <igor@sysoev.ru>
date Tue, 29 Jan 2008 07:06:18 +0000
parents 9afb84c7cc61
children 5d076348c121
files src/core/ngx_cpuinfo.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_cpuinfo.c
+++ b/src/core/ngx_cpuinfo.c
@@ -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;
 
         /*