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>
Subject: [Xen-devel] Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: David Daney <ddaney@xxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2011 11:18:57 -0800
Cc: linux-m32r-ja@xxxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, Linux-Arch <linux-arch@xxxxxxxxxxxxxxx>, linux-s390@xxxxxxxxxxxxxxx, Jesper Nilsson <jesper.nilsson@xxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Russell King <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>, xen-devel@xxxxxxxxxxxxxxxxxxx, Mikael Starvik <starvik@xxxxxxxx>, linux-m32r@xxxxxxxxxxxxxxxxx, Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>, user-mode-linux-user@xxxxxxxxxxxxxxxxxxxxx, uclinux-dist-devel@xxxxxxxxxxxxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Richard Henderson <rth@xxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx, linux-cris-kernel@xxxxxxxx, linux-am33-list@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, 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, Helge Deller <deller@xxxxxx>
Delivery-date: Tue, 18 Jan 2011 03:27:40 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1295262433.30950.53.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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
On 01/17/2011 03:07 AM, Peter Zijlstra wrote:
For future rework of try_to_wake_up() we'd like to push part of that
onto the CPU the task is actually going to run on, in order to do so we
need a generic callback from the existing scheduler IPI.

This patch introduces such a generic callback: scheduler_ipi() and
implements it as a NOP.

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.

Also, while reading through all this, I noticed the blackfin SMP code
looks to be broken, it simply discards any IPI when low on memory.

Signed-off-by: Peter Zijlstra<a.p.zijlstra@xxxxxxxxx>
---
  arch/alpha/kernel/smp.c         |    1 +
  arch/arm/kernel/smp.c           |    1 +
  arch/blackfin/mach-common/smp.c |    3 ++-
  arch/cris/arch-v32/kernel/smp.c |   13 ++++++++-----
  arch/ia64/kernel/irq_ia64.c     |    2 ++
  arch/ia64/xen/irq_xen.c         |   10 +++++++++-
  arch/m32r/kernel/smp.c          |    2 +-
  arch/mips/kernel/smtc.c         |    1 +
  arch/mips/sibyte/bcm1480/smp.c  |    7 +++----
  arch/mips/sibyte/sb1250/smp.c   |    7 +++----
[...]

Peter,

You will also have to patch the mailbox_interrupt() function in arch/mips/cavium-octeon/smp.c

David Daney.

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

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