WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] sched: provide scheduler_ipi() callback in respo

To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, David Daney <ddaney@xxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Date: Tue, 25 Jan 2011 00:03:26 +0100
Cc: linux-mips@xxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Helge Deller <deller@xxxxxx>, sparclinux@xxxxxxxxxxxxxxx, Linux-Arch <linux-arch@xxxxxxxxxxxxxxx>, linux-s390@xxxxxxxxxxxxxxx, Jesper Nilsson <jesper.nilsson@xxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx>, Hirokazu Takata <takata@xxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Mike Frysinger <vapier@xxxxxxxxxx>, user-mode-linux-devel@xxxxxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Jeff Dike <jdike@xxxxxxxxxxx>, Chris Metcalf <cmetcalf@xxxxxxxxxx>, Mikael Starvik <starvik@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>, user-mode-linux-user@xxxxxxxxxxxxxxxxxxxxx, uclinux-dist-devel@xxxxxxxxxxxxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Richard Henderson <rth@xxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx, linux-cris-kernel@xxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Kyle McMartin <kyle@xxxxxxxxxxx>, Paul Mundt <lethal@xxxxxxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, linux390@xxxxxxxxxx, Koichi Yasutake <yasutake.koichi@xxxxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>
Delivery-date: Tue, 25 Jan 2011 02:01:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1295264509.30950.59.camel@laptop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1295262433.30950.53.camel@laptop> <20110117112637.GA18599@xxxxxxxxxxxxxxxxxxxxxx> <1295263884.30950.54.camel@laptop> <1295264509.30950.59.camel@laptop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Jan 17, 2011 at 12:41:49PM +0100, Peter Zijlstra wrote:

> I visited existing smp_send_reschedule() implementations and tried to
> add a call to scheduler_ipi() in their handler part, but esp. for MIPS
> I'm not quite sure I actually got all of them.

No, you didn't.  Here are a few more for you to fold into the existing patch.

  Ralf

Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

 arch/mips/cavium-octeon/smp.c       |    2 ++
 arch/mips/mti-malta/malta-int.c     |    2 ++
 arch/mips/pmc-sierra/yosemite/smp.c |    4 ++++
 arch/mips/sgi-ip27/ip27-irq.c       |    2 ++
 4 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index 391cefe..170684a 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -44,6 +44,8 @@ static irqreturn_t mailbox_interrupt(int irq, void *dev_id)
 
        if (action & SMP_CALL_FUNCTION)
                smp_call_function_interrupt();
+       if (action & SMP_RESCHEDULE_YOURSELF)
+               scheduler_ipi();
 
        /* Check if we've been told to flush the icache */
        if (action & SMP_ICACHE_FLUSH)
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c
index b79b24a..fc7571f 100644
--- a/arch/mips/mti-malta/malta-int.c
+++ b/arch/mips/mti-malta/malta-int.c
@@ -309,6 +309,8 @@ static void ipi_call_dispatch(void)
 
 static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
 {
+       scheduler_ipi();
+
        return IRQ_HANDLED;
 }
 
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c 
b/arch/mips/pmc-sierra/yosemite/smp.c
index efc9e88..2608752 100644
--- a/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/arch/mips/pmc-sierra/yosemite/smp.c
@@ -55,6 +55,8 @@ void titan_mailbox_irq(void)
 
                if (status & 0x2)
                        smp_call_function_interrupt();
+               if (status & 0x4)
+                       scheduler_ipi();
                break;
 
        case 1:
@@ -63,6 +65,8 @@ void titan_mailbox_irq(void)
 
                if (status & 0x2)
                        smp_call_function_interrupt();
+               if (status & 0x4)
+                       scheduler_ipi();
                break;
        }
 }
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c
index 6a123ea..81d6548 100644
--- a/arch/mips/sgi-ip27/ip27-irq.c
+++ b/arch/mips/sgi-ip27/ip27-irq.c
@@ -147,8 +147,10 @@ static void ip27_do_irq_mask0(void)
 #ifdef CONFIG_SMP
        if (pend0 & (1UL << CPU_RESCHED_A_IRQ)) {
                LOCAL_HUB_CLR_INTR(CPU_RESCHED_A_IRQ);
+               scheduler_ipi();
        } else if (pend0 & (1UL << CPU_RESCHED_B_IRQ)) {
                LOCAL_HUB_CLR_INTR(CPU_RESCHED_B_IRQ);
+               scheduler_ipi();
        } else if (pend0 & (1UL << CPU_CALL_A_IRQ)) {
                LOCAL_HUB_CLR_INTR(CPU_CALL_A_IRQ);
                smp_call_function_interrupt();

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>