linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Diwakar Tundlam <dtundlam@nvidia.com>
To: "'Ingo Molnar'" <mingo@elte.hu>,
	"'Peter Zijlstra'" <peterz@infradead.org>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>,
	Antti Miettinen <amiettinen@nvidia.com>,
	Matthew Longnecker <MLongnecker@nvidia.com>,
	Kevin Kranzusch <KKranzusch@nvidia.com>
Subject: Fix bug: Scheduler's idle-load-balancer not running in first 5 mins after bootup
Date: Mon, 30 Jan 2012 10:14:23 -0800	[thread overview]
Message-ID: <1DD7BFEDD3147247B1355BEFEFE466523791832BD5@HQMAIL04.nvidia.com> (raw)

We ran into this at Nvidia. QA filed a bug saying coremark_4pthreads scores lower (as if running on 3 cores) when run shortly after bootup. But later its score increases to expected values on 4 cores.

This patch is relevant to linux-2.6.39 but I noticed this fix is not made in linux-3.0, 3.1, 3.2 or 3.3 also.

Please see commit log for more details of the problem and fix.

Thanks,
  Diwakar.
  Tegra Android Kernel SW Engg.
  NVIDIA.
  Santa Clara, CA

commit d04d7ef0e3f8c70bd6cd5abb2abc0236aa8d1f7c
Author: Diwakar Tundlam <dtundlam@nvidia.com>
Date:   Wed Jan 18 18:58:57 2012 -0800

    scheduler: domain: init next_balance in nohz_idle_balancer with jiffies
    
    The next_balance parameter of nohz_idle_balancer should be initialized
    to jiffies since jiffies itself is initialized to 300 seconds shy of
    overflow. Otherwise, nohz_idle_balancer does not run for the first 5
    mins after bootup.
    
    Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
    Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
    Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
    Reviewed-by: Satya Popuri <spopuri@nvidia.com>

 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c index c5b09f7..506c5da 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8288,6 +8288,7 @@ void __init sched_init(void)
        atomic_set(&nohz.load_balancer, nr_cpu_ids);
        atomic_set(&nohz.first_pick_cpu, nr_cpu_ids);
        atomic_set(&nohz.second_pick_cpu, nr_cpu_ids);
+       nohz.next_balance = jiffies;
 #endif
        /* May be allocated at isolcpus cmdline parse time */
        if (cpu_isolated_map == NULL)

             reply	other threads:[~2012-01-30 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 18:14 Diwakar Tundlam [this message]
2012-01-31  3:49 ` Fix bug: Scheduler's idle-load-balancer not running in first 5 mins after bootup Mike Galbraith
2012-01-31 19:15   ` Diwakar Tundlam
2012-01-31 15:52 ` Kamalesh Babulal

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=1DD7BFEDD3147247B1355BEFEFE466523791832BD5@HQMAIL04.nvidia.com \
    --to=dtundlam@nvidia.com \
    --cc=KKranzusch@nvidia.com \
    --cc=MLongnecker@nvidia.com \
    --cc=amiettinen@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pdeschrijver@nvidia.com \
    --cc=peterz@infradead.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 NNTP newsgroup(s).