{"id":11,"date":"2006-10-09T04:51:07","date_gmt":"2006-10-09T04:50:32","guid":{"rendered":""},"modified":"2017-03-07T09:35:41","modified_gmt":"2017-03-07T16:35:41","slug":"cpu_fun","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/kingtaco\/2006\/10\/09\/cpu_fun\/","title":{"rendered":"cpu fun"},"content":{"rendered":"<p>While looking at options 2.6.18 provided, I came across cpu &#8220;hotplug&#8221;, where one can turn on\/off CPUs on the fly.  On my workstation(dual opteron 248) I enabled CONFIG_HOTPLUG_CPU and rebooted.  A simple # echo 0 > \/sys\/devices\/system\/cpu\/cpu1\/online and \/proc\/cpuinfo only shows one processor.  This showed up in dmesg:<br \/>\n<code><br \/>\nCPU 1 is now offline<br \/>\nSMP alternatives: switching to UP code<br \/>\n<\/code><\/p>\n<p>After # echo 1 > \/sys\/devices\/system\/cpu\/cpu1\/online \/proc\/cpuinfo shows both CPUs and dmesg contains this:<br \/>\n<code><br \/>\nSMP alternatives: switching to SMP code<br \/>\nBooting processor 1\/2 APIC 0x1<br \/>\nInitializing CPU#1<br \/>\nCalibrating delay using timer specific routine.. 4410.23 BogoMIPS (lpj=22051180)<br \/>\nCPU: L1 I Cache: 64K (64 bytes\/line), D cache 64K (64 bytes\/line)<br \/>\nCPU: L2 Cache: 1024K (64 bytes\/line)<br \/>\nCPU 1\/1 -> Node 0<br \/>\nAMD Opteron(tm) Processor 248 stepping 0a<br \/>\nCPU 1: Syncing TSC to CPU 0.<br \/>\nCPU 1: synchronized TSC with CPU 0 (last diff 2 cycles, maxerr 821 cycles)<br \/>\n<\/code><\/p>\n<p>This makes me wonder &#8220;how much&#8221; the CPU is shut down&#8230;  I wonder if this could be used as some sort of power management for SMP systems.<\/p>\n<p>Time to find a ammeter&#8230;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While looking at options 2.6.18 provided, I came across cpu &#8220;hotplug&#8221;, where one can turn on\/off CPUs on the fly. On my workstation(dual opteron 248) I enabled CONFIG_HOTPLUG_CPU and rebooted. A simple # echo 0 > \/sys\/devices\/system\/cpu\/cpu1\/online and \/proc\/cpuinfo only shows one processor. This showed up in dmesg: CPU 1 is now offline SMP alternatives: &hellip; <a href=\"https:\/\/blogs.gentoo.org\/kingtaco\/2006\/10\/09\/cpu_fun\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">cpu fun<\/span><\/a><\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,3],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/posts\/11"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":1,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":36,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/posts\/11\/revisions\/36"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/kingtaco\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}