From: Philippe Gerum <rpm@xenomai.org>
To: Pierangelo Masarati <masarati@domain.hid>
Cc: adeos-main@gna.org
Subject: Re: [Adeos-main] latency fix for 2.6.25?
Date: Mon, 16 Jun 2008 18:32:46 +0200 [thread overview]
Message-ID: <485695AE.7030509@domain.hid> (raw)
In-Reply-To: <48568E78.5000606@domain.hid>
Pierangelo Masarati wrote:
> Dear ADEOS users,
>
> 2.6.25 seems to show abnormal latencies on hardware that showed good
> performances up to 2.6.24. We think we traced down the issue to x86's
> process_xx.c, which disappeared after regressing default_idle() to
> 2.6.24. The related changes are described in the attached patch.
>
This patch would badly break the runqueue statistics, and likely the Linux
scheduler tick engine too.
Actually, the hunk in default_idle() seems useless, since co-kernel activity
should be accounted as Linux idle time anyway. Does this patch also fixes
the issue you tracked down?
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 8d71912..d97c8c2 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -111,7 +111,7 @@ void default_idle(void)
*/
smp_mb();
- local_irq_disable_hw();
+ local_irq_disable();
if (!need_resched()) {
ktime_t t0, t1;
u64 t0n, t1n;
@@ -123,9 +123,8 @@ void default_idle(void)
t1 = ktime_get();
t1n = ktime_to_ns(t1);
sched_clock_idle_wakeup_event(t1n - t0n);
- local_irq_enable(); /* This will force enable_hw as well. */
- } else
- local_irq_enable_hw();
+ }
+ local_irq_enable();
current_thread_info()->status |= TS_POLLING;
} else {
/* loop is done by the caller */
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index fa242a4..a3b2fa7 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -107,7 +107,7 @@ void default_idle(void)
* test NEED_RESCHED:
*/
smp_mb();
- local_irq_disable_hw();
+ local_irq_disable();
if (!need_resched()) {
ktime_t t0, t1;
u64 t0n, t1n;
@@ -119,9 +119,8 @@ void default_idle(void)
t1 = ktime_get();
t1n = ktime_to_ns(t1);
sched_clock_idle_wakeup_event(t1n - t0n);
- local_irq_enable(); /* This will force enable_hw as well. */
- } else
- local_irq_enable_hw();
+ }
+ local_irq_enable();
current_thread_info()->status |= TS_POLLING;
}
--
Philippe.
next prev parent reply other threads:[~2008-06-16 16:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-16 16:02 [Adeos-main] latency fix for 2.6.25? Pierangelo Masarati
2008-06-16 16:32 ` Philippe Gerum [this message]
2008-06-17 10:41 ` Pierangelo Masarati
2008-06-17 11:03 ` Philippe Gerum
2008-06-17 11:09 ` Philippe Gerum
2008-06-17 11:14 ` Philippe Gerum
2008-06-17 12:54 ` Pierangelo Masarati
2008-06-17 13:04 ` Philippe Gerum
2008-06-18 10:36 ` Pierangelo Masarati
2008-06-18 17:13 ` Philippe Gerum
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=485695AE.7030509@domain.hid \
--to=rpm@xenomai.org \
--cc=adeos-main@gna.org \
--cc=masarati@domain.hid \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.