Saturday, June 28, 2008

Using microcode_ctl saves our day

Ok, here`s the deal issue, today ive figured out that my dual processor arent working as i wanted to be (or at least as it should be), i`ve already happy with firefox3 (it saves more vm) but still, this processor issue showd up again when im creating 3,5 Gigs vmware images (under NTFS partition), and yet sucking my 1# processor workload till 100%, while the 2# are not even working (only 5%), so what the hell is this.. So, i figure it out by googling some keywords (for ex: "gentoo + lenovo + dual processor optimization") which brought me to this thinkwiki entry, and take me "deep" into "microcode_ctl"

The microcode_ctl utility is a companion to the IA32 microcode driver written by Tigran Aivazian . The utility has two uses:

  • it decodes and sends new microcode to the kernel driver to be uploaded to Intel IA32 processors. (Pentium Pro, PII, PIII, Pentium 4, Celeron, Xeon etc - all P6 and above, which does NOT include pentium classics). It also supports processors of the x86_64 architecture.
  • it signals the kernel driver to release any buffers it may hold
The microcode update is volatile and needs to be uploaded on each system boot i.e. it doesn't reflash your cpu permanently, reboot and it reverts back to the old microcode

Then, i wanna implement this to my gentoo. First, we need to check whether its already build or set as module in my kernel (the advantage of using a module is that it's loaded to do the update and then unloaded automatically afterward)
$ sudo cat /usr/src/linux/.config | grep CONFIG_MICROCODE
CONFIG_MICROCODE=m
CONFIG_MICROCODE_OLD_INTERFACE=y
ok, sounds good, Now we need to install the microcode_ctl and the database file (.dat),
#emerge microcode-ctl
#/etc/init.d/microcode_ctl start
check dmesg output, if u found somethin like this "IA-32 Microcode Update Driver: v1.14a ", then it should be fine. Because this update is volatile, it has to be done every time the machine is rebooted by using
#rc-update add microcode_ctl default
Now you can check your dual processor working load (did they share? :P). How about mine? yes it works perfectly, especially to " signalling
the kernel driver to release any buffers it may hold"

images are property of http://www.treehugger.com

No comments:

Post a Comment