Not yet
As I advertised yesterday, I had a short look at hyper threading today. Well, that short look was actually a bit longer than what I hoped for - and it even still doesn’t work.
While starting up the second logical processor is working almost fine - for some reason it needs some longer timeouts between the initialization commands - I get no interrupts anymore, when both processors are running. Have I said none? Not true, as the inter-CPU messages (which are interrupt based) are still working. But even the APIC timers don’t trigger an interrupt anymore (the timer interrupt is what makes the CPU switch to another thread from time to time).
So both processors are running the thread they were given at some point. Sometimes they went through until the disk manager is trying to read something from a disk (as you need interrupts for that), sometimes they hang before - probably depending on which CPU gets which thread. The page daemon for example, isn’t likely to get us that far :-)
Anyway, the APICs are correctly initialized and enabled - the only thing that I still don’t touch is the I/O APIC which is responsible for dispatching interrupts to the local CPU APICs. But since it’s working fine in a uni-processor environment, it should also just work with both CPUs running.
So even though Hyper Threading seems to be popular, I am postponing it a bit - it would definitely take some more time to get right. I’ll probably tackle it again when the system doesn’t use the virtual wire mode anymore for SMP (in a few weeks, I’d guess). Also, to really configure the system correctly, we should look at ACPI which isn’t available in the boot loader right now.
If you want to give it a try yourself, Hyper Threading is currently disabled: to enable it, you’d have to uncomment lines 228 to 231 in src/system/boot/platform/bios_ia32/smp.cpp. But don’t get your hopes up too much :-)
Now, it’s app_server time.