[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] xen/sched: remove special cases for free cpus in schedulers
commit 5be89e469339ca2620bb002d936b830f03008042 Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Fri Nov 8 08:02:53 2019 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Wed Jan 22 17:37:11 2020 +0000 xen/sched: remove special cases for free cpus in schedulers With the idle scheduler now taking care of all cpus not in any cpupool the special cases in the other schedulers for no cpupool associated can be removed. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Dario Faggioli <dfaggioli@xxxxxxxx> --- xen/common/sched/credit.c | 7 ++----- xen/common/sched/credit2.c | 30 ------------------------------ 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/xen/common/sched/credit.c b/xen/common/sched/credit.c index 4329d9df56..6b04f8f71c 100644 --- a/xen/common/sched/credit.c +++ b/xen/common/sched/credit.c @@ -1690,11 +1690,8 @@ csched_load_balance(struct csched_private *prv, int cpu, BUG_ON(get_sched_res(cpu) != snext->unit->res); - /* - * If this CPU is going offline, or is not (yet) part of any cpupool - * (as it happens, e.g., during cpu bringup), we shouldn't steal work. - */ - if ( unlikely(!cpumask_test_cpu(cpu, online) || c == NULL) ) + /* If this CPU is going offline, we shouldn't steal work. */ + if ( unlikely(!cpumask_test_cpu(cpu, online)) ) goto out; if ( snext->pri == CSCHED_PRI_IDLE ) diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index 65e8ab052e..849d254e04 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -2744,40 +2744,10 @@ static void csched2_unit_migrate( const struct scheduler *ops, struct sched_unit *unit, unsigned int new_cpu) { - struct domain *d = unit->domain; struct csched2_unit * const svc = csched2_unit(unit); struct csched2_runqueue_data *trqd; s_time_t now = NOW(); - /* - * Being passed a target pCPU which is outside of our cpupool is only - * valid if we are shutting down (or doing ACPI suspend), and we are - * moving everyone to BSP, no matter whether or not BSP is inside our - * cpupool. - * - * And since there indeed is the chance that it is not part of it, all - * we must do is remove _and_ unassign the unit from any runqueue, as - * well as updating v->processor with the target, so that the suspend - * process can continue. - * - * It will then be during resume that a new, meaningful, value for - * v->processor will be chosen, and during actual domain unpause that - * the unit will be assigned to and added to the proper runqueue. - */ - if ( unlikely(!cpumask_test_cpu(new_cpu, cpupool_domain_master_cpumask(d))) ) - { - ASSERT(system_state == SYS_STATE_suspend); - if ( unit_on_runq(svc) ) - { - runq_remove(svc); - update_load(ops, svc->rqd, NULL, -1, now); - } - _runq_deassign(svc); - sched_set_res(unit, get_sched_res(new_cpu)); - return; - } - - /* If here, new_cpu must be a valid Credit2 pCPU, and in our affinity. */ ASSERT(cpumask_test_cpu(new_cpu, &csched2_priv(ops)->initialized)); ASSERT(cpumask_test_cpu(new_cpu, unit->cpu_hard_affinity)); -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |