All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: LAK <linux-arm-kernel@lists.infradead.org>,
	John Stultz <john.stultz@linaro.org>,
	Arjan van de Veen <arjan@infradead.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Jason Liu <liu.h.jason@gmail.com>,
	x86@kernel.org
Subject: [patch 7/7] x86: Use tick broadcast expired check
Date: Wed, 06 Mar 2013 11:18:37 -0000	[thread overview]
Message-ID: <20130306111537.702278273@linutronix.de> (raw)
In-Reply-To: 20130306111351.883117670@linutronix.de

[-- Attachment #1: x86-use-broadcast-expired-check.patch --]
[-- Type: text/plain, Size: 894 bytes --]

Avoid going back into deep idle if the tick broadcast IPI is about to
fire.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
---
 arch/x86/kernel/process.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: tip/arch/x86/kernel/process.c
===================================================================
--- tip.orig/arch/x86/kernel/process.c
+++ tip/arch/x86/kernel/process.c
@@ -336,6 +336,18 @@ void cpu_idle(void)
 			local_touch_nmi();
 			local_irq_disable();
 
+			/*
+			 * We detected in the wakeup path that the
+			 * tick broadcast device expired for us, but
+			 * we raced with the other CPU and came back
+			 * here before it was able to fire the IPI.
+			 * No point in going idle.
+			 */
+			if (tick_check_broadcast_expired()) {
+				local_irq_enable();
+				continue;
+			}
+
 			enter_idle();
 
 			/* Don't trace irqs off for idle */



WARNING: multiple messages have this Message-ID (diff)
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch 7/7] x86: Use tick broadcast expired check
Date: Wed, 06 Mar 2013 11:18:37 -0000	[thread overview]
Message-ID: <20130306111537.702278273@linutronix.de> (raw)
In-Reply-To: 20130306111351.883117670@linutronix.de

An embedded and charset-unspecified text was scrubbed...
Name: x86-use-broadcast-expired-check.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130306/9e773a0f/attachment.ksh>

  parent reply	other threads:[~2013-03-06 11:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 11:18 [patch 0/7] tick: Optimize broadcast handling and prevent expiry ping pong Thomas Gleixner
2013-03-06 11:18 ` Thomas Gleixner
2013-03-06 11:18 ` [patch 1/7] tick: Call tick_init late Thomas Gleixner
2013-03-06 11:18   ` Thomas Gleixner
2013-03-07 16:29   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-03-06 11:18 ` [patch 2/7] tick: Convert broadcast cpu bitmaps to cpumask_var_t Thomas Gleixner
2013-03-06 11:18   ` Thomas Gleixner
2013-03-07  5:51   ` Rusty Russell
2013-03-07  5:51     ` Rusty Russell
2013-03-07 16:30   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-03-06 11:18 ` [patch 3/7] tick: Avoid programming the local cpu timer if broadcast pending Thomas Gleixner
2013-03-06 11:18   ` Thomas Gleixner
2013-03-19 11:35   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-03-06 11:18 ` [patch 4/7] tick: Handle broadcast wakeup of multiple cpus Thomas Gleixner
2013-03-06 11:18   ` Thomas Gleixner
2013-03-13 11:36   ` Lorenzo Pieralisi
2013-03-13 11:36     ` Lorenzo Pieralisi
2013-03-13 21:42     ` Thomas Gleixner
2013-03-13 21:42       ` Thomas Gleixner
2013-03-19 11:37   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-03-06 11:18 ` [patch 5/7] tick: Provide a check for a forced broadcast pending Thomas Gleixner
2013-03-06 11:18   ` Thomas Gleixner
2013-03-19 11:38   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-03-06 11:18 ` [patch 6/7] arm: Use tick broadcast expired check Thomas Gleixner
2013-03-06 11:18   ` Thomas Gleixner
2013-03-19 11:39   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-03-06 11:18 ` Thomas Gleixner [this message]
2013-03-06 11:18   ` [patch 7/7] x86: " Thomas Gleixner
2013-03-19 11:40   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2013-03-13  9:35 ` [patch 0/7] tick: Optimize broadcast handling and prevent expiry ping pong Santosh Shilimkar
2013-03-13  9:35   ` Santosh Shilimkar

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=20130306111537.702278273@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=arjan@infradead.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liu.h.jason@gmail.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=x86@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 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.