[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] scheduler: Add a per-scheduler yield callback
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |