|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 1 of 5] credit2: Add context_saved scheduler callback
2 files changed, 3 insertions(+)
xen/common/schedule.c | 2 ++
xen/include/xen/sched-if.h | 1 +
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>
diff -r c02cc832cb2d -r 2631707c54b3 xen/common/schedule.c
--- a/xen/common/schedule.c Tue Apr 13 18:19:33 2010 +0100
+++ b/xen/common/schedule.c Wed Apr 14 11:16:58 2010 +0100
@@ -923,6 +923,8 @@
/* 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 c02cc832cb2d -r 2631707c54b3 xen/include/xen/sched-if.h
--- a/xen/include/xen/sched-if.h Tue Apr 13 18:19:33 2010 +0100
+++ b/xen/include/xen/sched-if.h Wed Apr 14 11:16:58 2010 +0100
@@ -70,6 +70,7 @@
void (*sleep) (struct vcpu *);
void (*wake) (struct vcpu *);
+ void (*context_saved) (struct vcpu *);
struct task_slice (*do_schedule) (s_time_t);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|