C-States and Hyperthreading working
I have a Fit-pc2i 1.2 from two weeks ago, I tried several distributions and Ubuntu 9.10 is the best work by following the instructions on the wiki ( http://www.fit-pc2.com/wiki/index.php?t ... buntu_9.10 ). Finally I decided to use Ubuntu 9.10 but became unstable when activated Hiperthreading and C-States in the Bios.
I compiled a new kernel based on the original 2.6.31-34-fitpc2 to add a patch that enables support for Reiserfs4 filesystem, without making any other changes:
zcat /proc/config.gz | diff -uN /boot/config-2.6.31-34-fitpc2 -
--- /boot/config-2.6.31-34-fitpc2 2010-06-16 11:01:59.000000000 +0200
+++ - 2010-07-06 18:28:55.478595100 +0200
@@ -1,9 +1,7 @@
-
-
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.31-34-fitpc2
-# Wed Jun 16 11:23:06 2010
+# Linux kernel version: 2.6.31-34-fitpc2i
+# Sun Jun 27 18:56:14 2010
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
@@ -3216,7 +3214,7 @@
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
-# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
@@ -3230,6 +3228,8 @@
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
+CONFIG_REISER4_FS=m
+# CONFIG_REISER4_DEBUG is not set
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
CONFIG_REISERFS_PROC_INFO=y
From yesterday I get working well with C-States Hiperthreading when I added on boot the following parameters to the kernel: acpi_irq_balance acpi_osi=Linux
menuentry "Ubuntu, Linux 2.6.31-34-fitpc2i" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod reiserfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 3b2e9f50-b894-4eca-a8e4-959ca4b2cb30
linux /boot/vmlinuz-2.6.31-34-fitpc2i root=UUID=3b2e9f50-b894-4eca-a8e4-959ca4b2cb30 ro quiet splash acpi_irq_balance acpi_osi=Linux
initrd /boot/initrd.img-2.6.31-34-fitpc2i
}
# uptime
18:46:35 up 1 day, 2:14, 6 users, load average: 0.40, 0.55, 0.66
# powertop
PowerTOP 1.11 (C) 2007, 2008 Intel Corporation
Collecting data for 5 seconds
Your CPU supports the following C-states : C1 C2 C4 C6
Your BIOS reports the following C-states : C1 C2 C4 C6
Cn Avg residency P-states (frequencies)
C0 (cpu running) ( 8.1%) 1.60 Ghz 4.2%
polling 0.0ms ( 0.0%) 1333 Mhz 0.1%
C1 mwait 0.0ms ( 0.8%) 1067 Mhz 0.1%
C2 mwait 0.1ms ( 0.2%) 800 Mhz 95.7%
C4 mwait 0.4ms ( 0.1%)
C6 mwait 8.0ms (90.8%)
Wakeups-from-idle per second : 351.4 interval: 15.0s
no ACPI power usage estimate available
Top causes for wakeups:
68.5% (541.4) <kernel IPI> : Function call interrupts
8.9% ( 70.5) <kernel core> : hrtimer_start_range_ns (tick_sched_timer)
3.0% ( 23.8) USB device 4-1.3 : Microsoft Wireless Optical Mouse® 1.00 (Microsoft)
2.6% ( 20.7) <interrupt> : iegd@pci:0000:00:02.0, eth0
2.6% ( 20.3) <interrupt> : uhci_hcd:usb4, mmc2
2.5% ( 19.7) <kernel core> : hrtimer_start (tick_sched_timer)
2.2% ( 17.4) <kernel IPI> : Rescheduling interrupts
1.5% ( 11.5) USB device 1-1 : NovaT 500Stick (Hauppauge)
1.2% ( 9.9) geyes_applet2 : hrtimer_start_range_ns (hrtimer_wakeup)
1.2% ( 9.6) <interrupt> : ehci_hcd:usb1
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU Z530 @ 1.60GHz
stepping : 2
cpu MHz : 800.000
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx est tm2 ssse3 xtpr pdcm movbe lahf_lm tpr_shadow vnmi flexpriority
bogomips : 3191.63
clflush size : 64
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU Z530 @ 1.60GHz
stepping : 2
cpu MHz : 800.000
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx est tm2 ssse3 xtpr pdcm movbe lahf_lm tpr_shadow vnmi flexpriority
bogomips : 3191.94
clflush size : 64
power management:
C-States and Hyperthreading in Linux
Re: C-States and Hyperthreading in Linux
Thanks for the info, I'll give it a try when I get back from my vacation.
Fit-PC2 and Fit-PC2i has different BIOSes, so this might not apply to Fit-PC2. Also, a good old stress test with tons of interrupts (preferably network and disc IO by transferring huge files) is needed to be on the safe side.
Cheers
Fit-PC2 and Fit-PC2i has different BIOSes, so this might not apply to Fit-PC2. Also, a good old stress test with tons of interrupts (preferably network and disc IO by transferring huge files) is needed to be on the safe side.
Cheers
Re: C-States and Hyperthreading in Linux
I test now with only one kernel parameter "acpi_osi=Linux"
It means the ACPI firmware gets to see 'Linux' as the string identifying your OS. What that means depends entirely upon the writers of the firmware, which usually only test Windows.
For add this parameter to grub in Ubuntu 9.10, edit /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"
Then run:
update-grub
# uptime
16:34:03 up 6 days, 1:37, 6 users, load average: 0.45, 0.58, 0.61
# powertop
PowerTOP 1.11 (C) 2007, 2008 Intel Corporation
Recolectando datos durante 5 segundos
Su CPU soporta los siguientes C-estados: C1 C2 C4 C6
Su BIOS reporta los siguientes C-estados: C1 C2 C4 C6
Cn Residencia media P-estados (frecuencias)
C0 (cpu ejecutando) (11,5%) 1,60 GHz 1,0%
sondeando 0,0ms ( 0,0% 1333 MHz 0,0%
C1 mwait 0,0ms ( 0,0%) 1067 MHz 0,0%
C2 mwait 0,1ms ( 0,0%) 800 MHz 98,9%
C4 mwait 0,2ms ( 0,0%)
C6 mwait 3,9ms (88,5%)
Despertares por segundo: 232,8 intervalo: 10,0s
las estimaciones de ACPI sobre el uso de corriente no están disponibles
Causas principales de despertares:
28,8% (128,6) chromium-browse : hrtimer_start_range_ns (hrtimer_wakeup)
23,4% (104,5) <núcleo> : hrtimer_start_range_ns (tick_sched_timer)
12,8% ( 57,2) <IPI núcleo> : Rescheduling interrupts
9,4% ( 42,2) <interrup> : eth0, iegd@pci:0000:00:02.0
6,2% ( 27,7) <interrup> : interrupción extra de reloj
3,2% ( 14,2) <núcleo> : hrtimer_start (tick_sched_timer)
2,8% ( 12,5) Dispositivo USB 1-3 : NovaT 500Stick (Hauppauge)
It means the ACPI firmware gets to see 'Linux' as the string identifying your OS. What that means depends entirely upon the writers of the firmware, which usually only test Windows.
For add this parameter to grub in Ubuntu 9.10, edit /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"
Then run:
update-grub
# uptime
16:34:03 up 6 days, 1:37, 6 users, load average: 0.45, 0.58, 0.61
# powertop
PowerTOP 1.11 (C) 2007, 2008 Intel Corporation
Recolectando datos durante 5 segundos
Su CPU soporta los siguientes C-estados: C1 C2 C4 C6
Su BIOS reporta los siguientes C-estados: C1 C2 C4 C6
Cn Residencia media P-estados (frecuencias)
C0 (cpu ejecutando) (11,5%) 1,60 GHz 1,0%
sondeando 0,0ms ( 0,0% 1333 MHz 0,0%
C1 mwait 0,0ms ( 0,0%) 1067 MHz 0,0%
C2 mwait 0,1ms ( 0,0%) 800 MHz 98,9%
C4 mwait 0,2ms ( 0,0%)
C6 mwait 3,9ms (88,5%)
Despertares por segundo: 232,8 intervalo: 10,0s
las estimaciones de ACPI sobre el uso de corriente no están disponibles
Causas principales de despertares:
28,8% (128,6) chromium-browse : hrtimer_start_range_ns (hrtimer_wakeup)
23,4% (104,5) <núcleo> : hrtimer_start_range_ns (tick_sched_timer)
12,8% ( 57,2) <IPI núcleo> : Rescheduling interrupts
9,4% ( 42,2) <interrup> : eth0, iegd@pci:0000:00:02.0
6,2% ( 27,7) <interrup> : interrupción extra de reloj
3,2% ( 14,2) <núcleo> : hrtimer_start (tick_sched_timer)
2,8% ( 12,5) Dispositivo USB 1-3 : NovaT 500Stick (Hauppauge)
Re: C-States and Hyperthreading in Linux
Back from vacation!
Yes, acpi_irq_balance is enabled by default when using IOAPIC so it shouldn't matter. Regarding acpi_osi=Linux you are correct. Specifying the OSI makes the ACPI code to take different paths, see code below:
I tried specifying OSI as Linux but on my Fit-PC2 it didn't make a difference. The hangs are still there, but as I mentioned, the Fit-PC2 and Fit-PC2i seem to have different BIOSes so there might be a "Linux fix" in the Fit-PC2i version. It is possible to override the BIOS DSDT table with your own modified version, so if you could provide me with a decompile of your DSDT I might be able to work something out. Here is what you do:
Can you can post the dsdt.dsl somewhere (it is too large for a forum post)?
Thanks
Yes, acpi_irq_balance is enabled by default when using IOAPIC so it shouldn't matter. Regarding acpi_osi=Linux you are correct. Specifying the OSI makes the ACPI code to take different paths, see code below:
Code: Select all
Method (_INI, 0, NotSerialized)
{
If (DTSE)
{
TRAP (0x47)
}
Store (0x07D0, OSYS)
If (CondRefOf (_OSI, Local0))
{
If (_OSI ("Linux"))
{
Store (0x01, LINX)
}
If (_OSI ("Windows 2001"))
{
Store (0x07D1, OSYS)
}
If (_OSI ("Windows 2001 SP1"))
{
Store (0x07D1, OSYS)
}
...
Code: Select all
$ sudo apt-get install iasl
$ sudo cp /proc/acpi/dsdt ./
$ sudo chown your_user_name ./dsdt
$ iasl -d ./dsdt
Thanks
Re: C-States and Hyperthreading in Linux
Thanks, I took a quick peek and it is in many ways similar to the Fit-PC2 DSDT. However there are quite a lot of small differences so it might be hard to find the fix.
Cheers
Cheers
Re: C-States and Hyperthreading in Linux
This fix didn't work for me with a fit-PC2i "pilot-batch" either. So I'd say it's jsut placebo (i.e. the lock-ups will still hapen, only maybe "later")...