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-changelog

[Xen-changelog] [xen-unstable] scheduler: Add a per-scheduler yield call

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] scheduler: Add a per-scheduler yield callback
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Aug 2010 13:55:42 -0700
Delivery-date: Wed, 11 Aug 2010 13:57:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1281368127 -3600
# Node ID 93074767205e33fc1351a61343a5c5a0fde4f9d5
# Parent  befd1814c0a262ce0d6c96727a76b907cdeecdc4
scheduler: Add a per-scheduler yield callback

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 xen/common/schedule.c      |    6 ++++++
 xen/include/xen/sched-if.h |    1 +
 2 files changed, 7 insertions(+)

diff -r befd1814c0a2 -r 93074767205e xen/common/schedule.c
--- a/xen/common/schedule.c     Mon Aug 09 16:33:45 2010 +0100
+++ b/xen/common/schedule.c     Mon Aug 09 16:35:27 2010 +0100
@@ -642,6 +642,12 @@ static long do_poll(struct sched_poll *s
 /* Voluntarily yield the processor for this allocation. */
 static long do_yield(void)
 {
+    struct vcpu * v=current;
+
+    vcpu_schedule_lock_irq(v);
+    SCHED_OP(VCPU2OP(v), yield, v);
+    vcpu_schedule_unlock_irq(v);
+
     TRACE_2D(TRC_SCHED_YIELD, current->domain->domain_id, current->vcpu_id);
     raise_softirq(SCHEDULE_SOFTIRQ);
     return 0;
diff -r befd1814c0a2 -r 93074767205e xen/include/xen/sched-if.h
--- a/xen/include/xen/sched-if.h        Mon Aug 09 16:33:45 2010 +0100
+++ b/xen/include/xen/sched-if.h        Mon Aug 09 16:35:27 2010 +0100
@@ -107,6 +107,7 @@ struct scheduler {
 
     void         (*sleep)          (const struct scheduler *, struct vcpu *);
     void         (*wake)           (const struct scheduler *, struct vcpu *);
+    void         (*yield)          (const struct scheduler *, struct vcpu *);
     void         (*context_saved)  (const struct scheduler *, struct vcpu *);
 
     struct task_slice (*do_schedule) (const struct scheduler *, s_time_t,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] scheduler: Add a per-scheduler yield callback, Xen patchbot-unstable <=