aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/sched-if.h
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-10-24 13:09:50 +0100
committerKeir Fraser <keir@xen.org>2010-10-24 13:09:50 +0100
commit7e6b926a17db1d63f1b8fd2745776f5369dacb4e (patch)
tree753bf45413056dc82c8d309d919a048149ff802b /xen/include/xen/sched-if.h
parent8e5c88afb0fb552ba803fecc1952d01293442d7d (diff)
downloadxen-7e6b926a17db1d63f1b8fd2745776f5369dacb4e.tar.gz
xen-7e6b926a17db1d63f1b8fd2745776f5369dacb4e.tar.bz2
xen-7e6b926a17db1d63f1b8fd2745776f5369dacb4e.zip
cpupools: Make interface more consistent
The current cpupools code interface is a bit inconsistent. This patch addresses this by making the interaction for each vcpu in a pool look like this: alloc_vdata() -- allocates and sets up vcpu data insert_vcpu() -- the vcpu is ready to run in this pool remove_vcpu() -- take the vcpu out of the pool free_vdata() -- delete allocated vcpu data (Previously, remove_vcpu and free_vdata were combined into a "destroy vcpu", and insert_vcpu was only called for idle vcpus.) This also addresses a bug in credit2 which was caused by a misunderstanding of the cpupools interface. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Diffstat (limited to 'xen/include/xen/sched-if.h')
-rw-r--r--xen/include/xen/sched-if.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h
index 3808344d11..3a7fbc4407 100644
--- a/xen/include/xen/sched-if.h
+++ b/xen/include/xen/sched-if.h
@@ -102,8 +102,9 @@ struct scheduler {
int (*init_domain) (const struct scheduler *, struct domain *);
void (*destroy_domain) (const struct scheduler *, struct domain *);
+ /* Activate / deactivate vcpus in a cpu pool */
void (*insert_vcpu) (const struct scheduler *, struct vcpu *);
- void (*destroy_vcpu) (const struct scheduler *, struct vcpu *);
+ void (*remove_vcpu) (const struct scheduler *, struct vcpu *);
void (*sleep) (const struct scheduler *, struct vcpu *);
void (*wake) (const struct scheduler *, struct vcpu *);