[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.6] Revert "xen: sched: don't call hooks of the wrong scheduler via VCPU2OP"



commit f96efeb0c6b4f499194571ef6d767534ba851c6a
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Apr 3 09:58:53 2017 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Apr 3 09:58:53 2017 +0200

    Revert "xen: sched: don't call hooks of the wrong scheduler via VCPU2OP"
    
    This reverts commit 7ff6d9fc19ef88d2ca3304a312c0e8a46b61f546,
    which osstest has found to be severely broken.
---
 xen/common/schedule.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index ca29a1c..fddcd52 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -78,27 +78,7 @@ static struct scheduler __read_mostly ops;
           : (typeof((opsptr)->fn(opsptr, ##__VA_ARGS__)))0 )
 
 #define DOM2OP(_d)    (((_d)->cpupool == NULL) ? &ops : ((_d)->cpupool->sched))
-static inline struct scheduler *VCPU2OP(const struct vcpu *v)
-{
-    struct domain *d = v->domain;
-
-    if ( likely(d->cpupool != NULL) )
-        return d->cpupool->sched;
-
-    /*
-     * If d->cpupool is NULL, this is a vCPU of the idle domain. And this
-     * case is special because the idle domain does not really belong to
-     * a cpupool and, hence, doesn't really have a scheduler). In fact, its
-     * vCPUs (may) run on pCPUs which are in different pools, with different
-     * schedulers.
-     *
-     * What we want, in this case, is the scheduler of the pCPU where this
-     * particular idle vCPU is running. And, since v->processor never changes
-     * for idle vCPUs, it is safe to use it, with no locks, to figure that out.
-     */
-    ASSERT(is_idle_domain(d));
-    return per_cpu(scheduler, v->processor);
-}
+#define VCPU2OP(_v)   (DOM2OP((_v)->domain))
 #define VCPU2ONLINE(_v) cpupool_online_cpumask((_v)->domain->cpupool)
 
 static inline void trace_runstate_change(struct vcpu *v, int new_state)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.6

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.