Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to disable hyperthreading in the kernel?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
few
Guru
Guru


Joined: 03 Mar 2008
Posts: 448

PostPosted: Fri May 29, 2009 5:46 am    Post subject: How to disable hyperthreading in the kernel? Reply with quote

Is it possible to tell the kernel to not use HT if it is enabled in the BIOS? Disabling in the BIOS is no option since I would have to do it on 64 systems.

Thanks for your help.

Edit: I forgot to mention, that disabling SMP is no option either, because there are two CPUs on each board.
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Fri May 29, 2009 6:10 am    Post subject: Reply with quote

Put noht in your boot loaders configuration file in the corresponding kernel line.
_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
few
Guru
Guru


Joined: 03 Mar 2008
Posts: 448

PostPosted: Sat May 30, 2009 10:42 am    Post subject: Reply with quote

massimo wrote:
Put noht in your boot loaders configuration file in the corresponding kernel line.


Did so, no change.
Back to top
View user's profile Send private message
few
Guru
Guru


Joined: 03 Mar 2008
Posts: 448

PostPosted: Sat May 30, 2009 11:16 am    Post subject: Reply with quote

Thanks to Theimon on #gentoo who pointed me to [1], I have now a workaround.

cat /etc/init.d/disable_ht
#!/sbin/runscript

depend() {
before gmond
}

start() {
ebegin "Disable CPU 1 und 3: "
echo 0 > /sys/devices/system/cpu/cpu1/online
echo 0 > /sys/devices/system/cpu/cpu3/online
eend $? "Failed to start disable_ht"
}

stop() {
ebegin "Enabling CPU 1 und 3: "
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu3/online
eend $? "Failed to stop disable_ht"
}

By forcing it to start before gmond, I make ganglia report only 2 CPUs.


[1] https://bugzilla.redhat.com/show_bug.cgi?id=440321
Back to top
View user's profile Send private message
frenkel
Veteran
Veteran


Joined: 13 May 2003
Posts: 1034
Location: .nl

PostPosted: Sat May 30, 2009 9:47 pm    Post subject: Reply with quote

Thanks for the script. I also couldn't get the "noht" option to work. Weird why it is listed as a valid option :S
_________________
http://techfield.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum