linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Diwakar Tundlam <dtundlam@nvidia.com>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] scheduler: domain: init next_balance in nohz_idle_balancer with jiffies
Date: Mon, 30 Jan 2012 14:44:22 +0200	[thread overview]
Message-ID: <1327927463-4165-1-git-send-email-pdeschrijver@nvidia.com> (raw)

From: Diwakar Tundlam <dtundlam@nvidia.com>

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>
---
 kernel/sched.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index b5efd6c..d3f291f 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8383,6 +8383,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)
-- 
1.7.7.rc0.72.g4b5ea.dirty


             reply	other threads:[~2012-01-30 12:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 12:44 Peter De Schrijver [this message]
2012-01-31 15:44 ` [PATCH] scheduler: domain: init next_balance in nohz_idle_balancer with jiffies Peter Zijlstra
2012-01-31 19:18   ` Diwakar Tundlam
2012-01-31 20:03     ` Peter Zijlstra
2012-01-31 19:23   ` Diwakar Tundlam
2012-01-31 20:02     ` Peter Zijlstra
2012-03-07 22:44       ` [PATCH] scheduler: domain: correctly initialize 'next_balance' in 'nohz' idle balancer Diwakar Tundlam
2012-03-08 10:39         ` Peter Zijlstra
2012-03-08 23:44         ` [PATCH] init: check printed flag to skip printing message Diwakar Tundlam
2012-03-09  0:07           ` Andrew Morton
2012-03-09  0:11           ` Joe Perches
2012-03-13  4:45         ` [tip:sched/core] sched/nohz: Correctly initialize 'next_balance' in 'nohz' idle balancer tip-bot for Diwakar Tundlam

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=1327927463-4165-1-git-send-email-pdeschrijver@nvidia.com \
    --to=pdeschrijver@nvidia.com \
    --cc=dtundlam@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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).