Skip to contentSkip to conversation

Is it possible to choose the *preferred* core?

DISCUSSION Dark Penguin 2 participants 2 messages Feb 14, 2018 – Feb 17, 2018 CPU hotplug

lore
Share & tools
lore
#0 lore raw

Greetings!

I have a pretty hot quad-core CPU, and one core is running significantly colder than others. Under load, it only approaches the idle temperature for the rest of the cores.

Is it possible to assign all threads to this core by default, but use other cores when one is not enough? Or maybe even all "heavy" threads, if having all cores under 1% load is better in terms of temperature than cramming them all into one core. (I'm not sure if it is.)

Signature · 1 line
darkpenguin
#1 lore raw

Dear Folks

If you notice all threads are running in a specific cpu, you might consider disabling it.
For example, below patch will disable the cpu3 during boot-up progress.

kernel/cpu.c +1 -1
index 5b4440d..14cce91 100644
@@ -510,7 +510,7 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen)
 
        cpu_hotplug_begin();
 
-       if (cpu_online(cpu) || !cpu_present(cpu)) {
+       if ( (cpu == 3) ||  cpu_online(cpu) || !cpu_present(cpu)) {
                ret = -EINVAL;
                goto out;
        }

2018-02-14 20:06 GMT+09:00 Dark Penguin <[email protected]>:

Quoted 18 lines

Greetings!

I have a pretty hot quad-core CPU, and one core is running significantly colder than others. Under load, it only approaches the idle temperature for the rest of the cores.

Is it possible to assign all threads to this core by default, but use other cores when one is not enough? Or maybe even all "heavy" threads, if having all cores under 1% load is better in terms of temperature than cramming them all into one core. (I'm not sure if it is.)

--
darkpenguin
--
To unsubscribe from this list: send the line "unsubscribe linux-smp" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html