* [PATCH] x86: Conditionally update time when ack-ing pending irqs
@ 2012-04-06 12:41 Ido Yariv
2012-04-19 22:12 ` [PATCH RESEND] " Ido Yariv
0 siblings, 1 reply; 4+ messages in thread
From: Ido Yariv @ 2012-04-06 12:41 UTC (permalink / raw)
To: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: Shai Fultheim, Ido Yariv
From: Shai Fultheim <shai@scalemp.com>
On virtual environments, apic_read could take a long time. As a result,
under certain conditions the ack pending loop may exit without any
queued irqs left, but after more than one second. A warning will be
printed needlessly in this case.
If the loop is about to exit regardless of max_loops, don't update it.
Signed-off-by: Shai Fultheim <shai@scalemp.com>
[ido@wizery.com: rebased and reworded the commit message]
Signed-off-by: Ido Yariv <ido@wizery.com>
---
arch/x86/kernel/apic/apic.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 11544d8..f0330f2 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1325,11 +1325,13 @@ void __cpuinit setup_local_APIC(void)
acked);
break;
}
- if (cpu_has_tsc) {
- rdtscll(ntsc);
- max_loops = (cpu_khz << 10) - (ntsc - tsc);
- } else
- max_loops--;
+ if (queued) {
+ if (cpu_has_tsc) {
+ rdtscll(ntsc);
+ max_loops = (cpu_khz << 10) - (ntsc - tsc);
+ } else
+ max_loops--;
+ }
} while (queued && max_loops > 0);
WARN_ON(max_loops <= 0);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH RESEND] x86: Conditionally update time when ack-ing pending irqs
2012-04-06 12:41 [PATCH] x86: Conditionally update time when ack-ing pending irqs Ido Yariv
@ 2012-04-19 22:12 ` Ido Yariv
2012-05-05 23:50 ` Ido Yariv
2012-05-08 4:24 ` [tip:x86/apic] " tip-bot for Shai Fultheim
0 siblings, 2 replies; 4+ messages in thread
From: Ido Yariv @ 2012-04-19 22:12 UTC (permalink / raw)
To: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: Shai Fultheim, Ido Yariv
From: Shai Fultheim <shai@scalemp.com>
On virtual environments, apic_read could take a long time. As a result,
under certain conditions the ack pending loop may exit without any
queued irqs left, but after more than one second. A warning will be
printed needlessly in this case.
If the loop is about to exit regardless of max_loops, don't update it.
Signed-off-by: Shai Fultheim <shai@scalemp.com>
[ido@wizery.com: rebased and reworded the commit message]
Signed-off-by: Ido Yariv <ido@wizery.com>
---
arch/x86/kernel/apic/apic.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 11544d8..f0330f2 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1325,11 +1325,13 @@ void __cpuinit setup_local_APIC(void)
acked);
break;
}
- if (cpu_has_tsc) {
- rdtscll(ntsc);
- max_loops = (cpu_khz << 10) - (ntsc - tsc);
- } else
- max_loops--;
+ if (queued) {
+ if (cpu_has_tsc) {
+ rdtscll(ntsc);
+ max_loops = (cpu_khz << 10) - (ntsc - tsc);
+ } else
+ max_loops--;
+ }
} while (queued && max_loops > 0);
WARN_ON(max_loops <= 0);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] x86: Conditionally update time when ack-ing pending irqs
2012-04-19 22:12 ` [PATCH RESEND] " Ido Yariv
@ 2012-05-05 23:50 ` Ido Yariv
2012-05-08 4:24 ` [tip:x86/apic] " tip-bot for Shai Fultheim
1 sibling, 0 replies; 4+ messages in thread
From: Ido Yariv @ 2012-05-05 23:50 UTC (permalink / raw)
To: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: Shai Fultheim, Ido Yariv
On Fri, Apr 20, 2012 at 1:12 AM, Ido Yariv <ido@wizery.com> wrote:
> From: Shai Fultheim <shai@scalemp.com>
>
> On virtual environments, apic_read could take a long time. As a result,
> under certain conditions the ack pending loop may exit without any
> queued irqs left, but after more than one second. A warning will be
> printed needlessly in this case.
>
> If the loop is about to exit regardless of max_loops, don't update it.
>
> Signed-off-by: Shai Fultheim <shai@scalemp.com>
> [ido@wizery.com: rebased and reworded the commit message]
> Signed-off-by: Ido Yariv <ido@wizery.com>
> ---
Ping?
Thanks,
Ido.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:x86/apic] x86: Conditionally update time when ack-ing pending irqs
2012-04-19 22:12 ` [PATCH RESEND] " Ido Yariv
2012-05-05 23:50 ` Ido Yariv
@ 2012-05-08 4:24 ` tip-bot for Shai Fultheim
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Shai Fultheim @ 2012-05-08 4:24 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, shai, ido, tglx
Commit-ID: 42fa4250436304d4650fa271f37671f6cee24e08
Gitweb: http://git.kernel.org/tip/42fa4250436304d4650fa271f37671f6cee24e08
Author: Shai Fultheim <shai@scalemp.com>
AuthorDate: Fri, 20 Apr 2012 01:12:32 +0300
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 7 May 2012 16:25:28 +0200
x86: Conditionally update time when ack-ing pending irqs
On virtual environments, apic_read could take a long time. As a
result, under certain conditions the ack pending loop may exit
without any queued irqs left, but after more than one second. A
warning will be printed needlessly in this case.
If the loop is about to exit regardless of max_loops, don't
update it.
Signed-off-by: Shai Fultheim <shai@scalemp.com>
[ rebased and reworded the commit message]
Signed-off-by: Ido Yariv <ido@wizery.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1334873552-31346-1-git-send-email-ido@wizery.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/apic/apic.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index edc2448..3beab62 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1325,11 +1325,13 @@ void __cpuinit setup_local_APIC(void)
acked);
break;
}
- if (cpu_has_tsc) {
- rdtscll(ntsc);
- max_loops = (cpu_khz << 10) - (ntsc - tsc);
- } else
- max_loops--;
+ if (queued) {
+ if (cpu_has_tsc) {
+ rdtscll(ntsc);
+ max_loops = (cpu_khz << 10) - (ntsc - tsc);
+ } else
+ max_loops--;
+ }
} while (queued && max_loops > 0);
WARN_ON(max_loops <= 0);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-08 4:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-06 12:41 [PATCH] x86: Conditionally update time when ack-ing pending irqs Ido Yariv
2012-04-19 22:12 ` [PATCH RESEND] " Ido Yariv
2012-05-05 23:50 ` Ido Yariv
2012-05-08 4:24 ` [tip:x86/apic] " tip-bot for Shai Fultheim
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).