Help me with CPU LIMIT [message #3095] |
Fri, 12 May 2006 07:59 |
nt1303
Messages: 11 Registered: April 2006
|
Junior Member |
|
|
Who can help me to hidden cpu Mhz limit in VPS ??????
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 2.66GHz
stepping : 8
cpu MHz : 801.857
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
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 pni ds_cpl
bogomips : 5242.88
|
|
|
|
|
Re: Help me with CPU LIMIT [message #3127 is a reply to message #3120] |
Sat, 13 May 2006 08:02 |
dev
Messages: 1693 Registered: September 2005 Location: Moscow
|
Senior Member |
|
|
do you want to hide it at all or just show HW node Mhz there?
if to hide at all try this kernel patch:
--- ./arch/i386/kernel/cpu/proc.c.cpuinf 2006-01-11 22:13:22.000000000 +0300
+++ ./arch/i386/kernel/cpu/proc.c 2006-05-13 12:00:20.000000000 +0400
@@ -87,7 +87,7 @@
else
seq_printf(m, "stepping\t: unknown\n");
- if ( cpu_has(c, X86_FEATURE_TSC) ) {
+ if ( ve_is_super(get_exec_env()) && cpu_has(c, X86_FEATURE_TSC) ) {
seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
vcpu_khz / 1000, (vcpu_khz % 1000));
}
--- ./arch/x86_64/kernel/setup.c.cpuinf 2006-01-11 22:13:17.000000000 +0300
+++ ./arch/x86_64/kernel/setup.c 2006-05-13 12:00:20.000000000 +0400
@@ -1093,7 +1093,7 @@
else
seq_printf(m, "stepping\t: unknown\n");
- if (cpu_has(c,X86_FEATURE_TSC)) {
+ if (ve_is_super(get_exec_env()) && cpu_has(c,X86_FEATURE_TSC)) {
seq_printf(m, "cpu MHz\t\t: %u.%03u\n",
cpu_khz / 1000, (cpu_khz % 1000));
}
|
|
|