From 48b7b9bd0e6ee241ec5f6317c2ce60eb1d30607d Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 29 Jan 2008 07:06:18 +0000 Subject: [PATCH] detect L2 cache line size for Intel Core --- src/core/ngx_cpuinfo.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/ngx_cpuinfo.c b/src/core/ngx_cpuinfo.c index 587f97811..68eb094c9 100644 --- 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; /*