64bit SMP Linux – AMD
If you’re a fan of cheap / fast / powerful hardware, then you’ve played with dual core AMDs more than a few times by now. If you’re a fan of Linux, then you may well have hit a snag, here.
You see, there’s a problem in the way the kernel addresses interrupts on the AMD dual core processors and the net upshot is, you can’t do it (out of the box). Rest assured, however, you can do it with a little work. Anyway, it’s Linux – of course there’s some more work involved! (At least it won’t kick you out of your own computer, though).
The situation you may find yourself in is this. You have a fresh new machine ready to go and you begin the Linux install process. This runs smoothly, probably fast as hell, too, on your shiny new box. After completion, the computer reboots, says “Decompressing the kernel” … and that’s it. It just sits there doing nothing. It’s hung.
The problem is, the installer runs in single processor mode but is smart enough to see you have two processors. So it installed the SMP kernel and set it as the default. Now you find you can’t boot up the new install, unless you interrupt the boot process and select Single CPU mode. Then it works, but you’re only useing one core.
The Solution:
To fix this problem, you’re going to need very little know-how and it won’t take too long. All you need to do is reconfigure the kernel to run in “noapic” mode. This can be done as follows:
- Boot up in single processor mode, i.e. don’t pick the SMP kernel.
- Locate your boot loader config file. I will assume you’re using GRUB and that the location of the config file is /boot/grub/
- Edit grub.conf and ensure that noapic is added to every SMP kernel line.
As an example:
title CentOS (2.6.9-55.0.2.ELsmp)
root (hd1,0)
kernel /vmlinuz-2.6.9-55.0.2.ELsmp ro root=/dev/md0 noapic rhgb quiet
initrd /initrd-2.6.9-55.0.2.ELsmp.img
That’s it! You should find you can now boot your system in SMP mode.
So what’s different?
Valid question. What have you lost by using noapic mode? In short, this means your CPU(s) will have to acknowledge all interrupts, which will slow you down a little. Will this be a big issue? Probably not. If it is for you, well you have two choices:
- Don’t use noapic and stick to one CPU. Obviously, you’re not going to do this because if you wanted one CPU you wouldn’t have bought a dual core.
- Go buy an Intel based processor. Obviously you’re not going to do this because if you wanted an Intel chip, you’d have bought it in the first place. Plus you’d need a new motherboard to go with it. And it would be 32bit, not 64.
So in short, this is what you have to do. If it’s not 100% best performance possible, bad luck, coz your alternative is even worse.
Hopefully it will just be something future kernel releases don’t suffer from or future AMD chips don’t suffer from.
