[<prev] [next>] [day] [month] [year] [list]
Message-ID: <49DCBBD3.60707@gmail.com>
Date: Wed, 08 Apr 2009 16:59:31 +0200
From: Uros Bizjak <ubizjak@...il.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
CC: "Ingo Molnar" <mingo@...e.hu>, x86@...nel.org
Subject: [PATCH v2, x86 CPA]: Add selfsnoop support
Hello!
This is second variant of a selfsnoop support for recent x86 CPUs. The
patch is effectively a one-liner and avoids calling clflush and wbinvd
to invalidate caches when CPU supports selfsnoop.
The patch applies to current git and -tip trees. This patch was tested
on Ubuntu 2.6.29.1 kernel:
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 1
model name : Intel(R) Pentium(R) 4 CPU 1.60GHz
stepping : 2
cpu MHz : 1594.873
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush dts acpi
mmx fxsr sse sse2 ss ht tm up pebs bts sync_rdtsc
bogomips : 3194.10
clflush size : 64
with CONFIG_CPA_DEBUG. Relevant self-test lines from the boot log are:
Apr 8 14:46:57 ubuntudsp kernel: [ 1.861293] Write protecting the
kernel text: 3988k
Apr 8 14:46:57 ubuntudsp kernel: [ 1.861298] Testing CPA: Reverting
c1000000-c13e5000
Apr 8 14:46:57 ubuntudsp kernel: [ 1.861412] Testing CPA: write
protecting again
Apr 8 14:46:57 ubuntudsp kernel: [ 1.861610] Write protecting the
kernel read-only data: 1776k
Apr 8 14:46:57 ubuntudsp kernel: [ 1.861615] Testing CPA: undo
c13e5000-c15a1000
Apr 8 14:46:57 ubuntudsp kernel: [ 1.861665] Testing CPA: write
protecting again
Apr 8 14:46:57 ubuntudsp kernel: [ 1.898397] exe used greatest stack
depth: 6808 bytes left
...
Apr 8 14:47:03 ubuntudsp kernel: [ 30.771018] CPA self-test:
Apr 8 14:47:03 ubuntudsp kernel: [ 30.771228] 4k 4992 large 155 gb 0
x 5147[c0000000-e7f7f000] miss 0
Apr 8 14:47:03 ubuntudsp kernel: [ 30.786583] 4k 148352 large 15 gb
0 x 148367[c0000000-e7f7f000] miss 0
Apr 8 14:47:03 ubuntudsp kernel: [ 30.793998] 4k 148352 large 15 gb
0 x 148367[c0000000-e7f7f000] miss 0
Apr 8 14:47:03 ubuntudsp kernel: [ 30.794010] ok.
The patched kernel was used on my workstation for my daily work for
several days (XWin, heavily compilations, IPTV, internet browsing) and I
didn't found any problems with the patched kernel.
Signed-off-by: Uros Bizjak <ubizjak@...il.com>
View attachment "p.diff" of type "text/plain" (1203 bytes)
Powered by blists - more mailing lists