linux-smp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: 김동현 <austindh.kim@gmail.com>
To: Dark Penguin <darkpenguin@yandex.ru>
Cc: linux-smp@vger.kernel.org
Subject: Re: Is it possible to choose the *preferred* core?
Date: Sat, 17 Feb 2018 23:04:58 +0900	[thread overview]
Message-ID: <CADLLry5C_Hi0AC1Q=wi9VCO==XT0Hd_+7nQjCbbu3H4RTN-F7Q@mail.gmail.com> (raw)
In-Reply-To: <5A84181A.30006@yandex.ru>

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.
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 5b4440d..14cce91 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -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 <darkpenguin@yandex.ru>:
> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2018-02-17 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 11:06 Is it possible to choose the *preferred* core? Dark Penguin
2018-02-17 14:04 ` 김동현 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADLLry5C_Hi0AC1Q=wi9VCO==XT0Hd_+7nQjCbbu3H4RTN-F7Q@mail.gmail.com' \
    --to=austindh.kim@gmail.com \
    --cc=darkpenguin@yandex.ru \
    --cc=linux-smp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).