public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: linux-ia64@vger.kernel.org
Subject: Beauties staggering timer interrupt
Date: Fri, 08 Apr 2005 22:21:20 +0000	[thread overview]
Message-ID: <200504082221.j38MLFg20356@unix-os.sc.intel.com> (raw)

This is more or less a teaser patch.  When we initialize local timer
tick on AP (application processor), we prefer to stagger them.  In a
perfect world, the staggering should be evenly spaced within a jiffy
for all the online cpu.  And that's what majority of the code in
ia64_cpu_local_tick() is trying to do.  However, when it initialize
itm_next, it didn't make any references to the AP's itm_next.  So we
end up with random staggering relative to AP's timer interrupt.

For platforms that has itc drift, this is not an issue since they going to
be out of sync anyway.  There is no point in trying to space them.  But on
box that has the itc synchronized, then current code is a bit suboptimal.
(this probably explains why it is easier to expose a scheduler idle load
balancing issue on ia64 compare to x86).

This patch will put the wonderful staggering calculation really in action.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>


--- linux-2.6.11/arch/ia64/kernel/time.c.orig	2005-04-08 14:39:00.000000000 -0700
+++ linux-2.6.11/arch/ia64/kernel/time.c	2005-04-08 14:56:41.000000000 -0700
@@ -131,8 +131,9 @@ ia64_cpu_local_tick (void)
 	if (cpu) {
 		unsigned long hi = 1UL << ia64_fls(cpu);
 		shift = (2*(cpu - hi) + 1) * delta/hi/2;
-	}
-	local_cpu_data->itm_next = ia64_get_itc() + delta + shift;
+		local_cpu_data->itm_next = cpu_data(0)->itm_next + delta + shift;
+	} else
+		local_cpu_data->itm_next = ia64_get_itc() + delta;
 	ia64_set_itm(local_cpu_data->itm_next);
 }





             reply	other threads:[~2005-04-08 22:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-08 22:21 Chen, Kenneth W [this message]
2005-04-08 22:33 ` Beauties staggering timer interrupt David Mosberger

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=200504082221.j38MLFg20356@unix-os.sc.intel.com \
    --to=kenneth.w.chen@intel.com \
    --cc=linux-ia64@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