提交 42fa4250 编写于 作者: S Shai Fultheim 提交者: Ingo Molnar

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: NShai Fultheim <shai@scalemp.com>
[ rebased and reworded the commit message]
Signed-off-by: NIdo Yariv <ido@wizery.com>
Acked-by: NThomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1334873552-31346-1-git-send-email-ido@wizery.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 22042c08
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册