[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] credit2: Add context_saved scheduler callback
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1271243007 -3600 # Node ID 5cd44772fd21be0f88e5de813193a9918e805091 # Parent ae08db793febf3a8da6cd74f38988d69d87d81a5 credit2: Add context_saved scheduler callback Because credit2 shares a runqueue between several cpus, it needs to know when a scheduled-out process has finally been context-switched away so that it can be added to the runqueue again. (Otherwise it may be grabbed by another processor before the context has been properly saved.) Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> --- xen/common/schedule.c | 2 ++ xen/include/xen/sched-if.h | 1 + 2 files changed, 3 insertions(+) diff -r ae08db793feb -r 5cd44772fd21 xen/common/schedule.c --- a/xen/common/schedule.c Wed Apr 14 11:56:54 2010 +0100 +++ b/xen/common/schedule.c Wed Apr 14 12:03:27 2010 +0100 @@ -885,6 +885,8 @@ void context_saved(struct vcpu *prev) /* Check for migration request /after/ clearing running flag. */ smp_mb(); + SCHED_OP(context_saved, prev); + if ( unlikely(test_bit(_VPF_migrating, &prev->pause_flags)) ) vcpu_migrate(prev); } diff -r ae08db793feb -r 5cd44772fd21 xen/include/xen/sched-if.h --- a/xen/include/xen/sched-if.h Wed Apr 14 11:56:54 2010 +0100 +++ b/xen/include/xen/sched-if.h Wed Apr 14 12:03:27 2010 +0100 @@ -70,6 +70,7 @@ struct scheduler { void (*sleep) (struct vcpu *); void (*wake) (struct vcpu *); + void (*context_saved) (struct vcpu *); struct task_slice (*do_schedule) (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 |