From: Matt Porter <mporter@kernel.crashing.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.linuxppc.org
Subject: [PATCH][PPC32] Optimize/fix timer_interrupt loop
Date: Mon, 9 Aug 2004 08:11:53 -0700 [thread overview]
Message-ID: <20040809081153.A22692@home.com> (raw)
The following patch fixes the situation where the loop condition could
generate a next_dec of zero while exiting the loop. This is suboptimal
on Classic PPC because it forces another interrupt to occur and
reenter the handler. It is fatal on Book E cores, because their
decrementer is stopped when writing a zero (Classic interrupts on
a 0->-1 transition, Book E interrupts on a 1->0 transition). Instead,
stay in the loop on a next_dec==0.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
===== arch/ppc/kernel/time.c 1.29 vs edited =====
--- 1.29/arch/ppc/kernel/time.c Tue Jun 22 12:05:08 2004
+++ edited/arch/ppc/kernel/time.c Tue Aug 3 13:32:22 2004
@@ -161,7 +161,7 @@
irq_enter();
- while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) < 0) {
+ while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
jiffy_stamp += tb_ticks_per_jiffy;
ppc_do_profile(regs);
reply other threads:[~2004-08-09 15:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040809081153.A22692@home.com \
--to=mporter@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.linuxppc.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
all inboxes | Powered by JetHome®