Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How 2 switch kernel CPU mode between Threaded / UnThreaded
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
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3999

PostPosted: Sun Feb 15, 2015 6:52 pm    Post subject: How 2 switch kernel CPU mode between Threaded / UnThreaded Reply with quote

Hi,

Should I achieve this with 2 differents .config?
Or should kernel command line suffices?
I expect "UnThreaded" to be time saving while emerging single threaded ebuilds.

Thks 4 ur attention


Last edited by CaptainBlood on Sun Feb 15, 2015 8:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Feb 15, 2015 7:58 pm    Post subject: Reply with quote

Your expectations are broken, unless you plan to run that emerge as the init process on a machine with no consoles or background processes at all.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3999

PostPosted: Sun Feb 15, 2015 8:50 pm    Post subject: Reply with quote

Thks for advice... :oops:

Anyhow the question remains:
Is it possible to configure kernel (via .config or command line) so that the 2 cores are taken into account, and that each core isn't splitted into 2 logical ones?

Thks 4 ur attention, interest & support
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54805
Location: 56N 3W

PostPosted: Sun Feb 15, 2015 9:57 pm    Post subject: Reply with quote

CaptainBlood,

Turn off Hyperthreading support in the BIOS and in the kernel.

I don't see a command line option in /usr/src/linux/Documentation/kernel-parameters.txt
Maybe there is something in the kernel help?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3999

PostPosted: Tue Feb 17, 2015 9:07 pm    Post subject: Reply with quote

NeddySeagoon wrote:
CaptainBlood,

Turn off Hyperthreading support in the BIOS and in the kernel.

I don't see a command line option in /usr/src/linux/Documentation/kernel-parameters.txt
Maybe there is something in the kernel help?


My laptop hasn't got such a setting.
Seems like there is no setting in kernel .config, but replacement of the CPU embeded hyperthreading scheduler.

Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2305
Location: Adendorf, Germany

PostPosted: Wed Feb 18, 2015 10:32 am    Post subject: Reply with quote

BIOS: Here you can (normally) set whether HyperThreading is supported or not. To use it, it must be enabled.
Kernel: Either build with the SMT Scheduler (CONFIG_SCHED_SMT) or not.

Disabling the SMT-Scheduler disables HyperThreading, no matter what you have set in your BIOS.
Enabling the SMT-Scheduler without enabling support in the BIOS only adds overhead.

On my laptop (i7, 4 cores) the overall performance is worse without HyperThreading. Nowadays it is a too rare occasion that a single process hogs only one logical CPU for disabling HyperThreading to give me any benefit.
This might, of course, be completely different on your setup.
_________________
Edited 220,176 times by Yamakuzure
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3999

PostPosted: Tue Mar 31, 2015 7:50 pm    Post subject: Reply with quote

Hi,
No such an option in laptop BIOS.

So seems like there are little chances to have dual core cpu involved without each being splited into 2 logical CPUs.

While doing
Quote:
emerge -e word
I've noticed many single threaded phases.

This is why I'm trying so hard to have system to work with the 2 physical CPUs.


Thks 4 ur attention; interest & support
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 311

PostPosted: Tue Apr 07, 2015 3:12 pm    Post subject: Reply with quote

just add kernel param maxcpus=<half_of_#cpu>, it only work on single cpu package or some 2way server.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3999

PostPosted: Tue Apr 07, 2015 6:21 pm    Post subject: Reply with quote

Yes that's an issue, only 1 CPU until next reboot.
Not an option, sorry. :wink:

Quote:
some 2way server
What do you mean?

Thks 4 ur attention, interest & support
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3999

PostPosted: Tue Apr 07, 2015 6:37 pm    Post subject: Reply with quote

Yamakuzure wrote:
Enabling the SMT-Scheduler without enabling support in the BIOS only adds overhead.
should be the way...
Let me think it over, & I'll get back 4 more results.
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 311

PostPosted: Wed Apr 08, 2015 8:16 am    Post subject: Reply with quote

On single CPU system, logical cpus always sorted by coreid threadid, ie: all physical cores at first, threaded-cpus next.
On two CPU system, some m/b sorted by coreid socketid threadid and others by coreid threadid socketid. First method upper half cpus is threaded, but second method, upper half cpus is second socket's.
CaptainBlood wrote:

Quote:
some 2way server
What do you mean?
Thks 4 ur attention, interest & support
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