[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.6] xen: credit2: always mark a tickled pCPU as... tickled!
commit 90ae9a76e30a05524eed8242bc128fb74a243e8a Author: Dario Faggioli <dario.faggioli@xxxxxxxxxx> AuthorDate: Tue Mar 14 14:05:14 2017 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Mar 14 14:05:14 2017 +0100 xen: credit2: always mark a tickled pCPU as... tickled! In fact, whether or not a pCPU has been tickled, and is therefore about to re-schedule, is something we look at and base decisions on in various places. So, let's make sure that we do that basing on accurate information. While there, also tweak a little bit smt_idle_mask_clear() (used for implementing SMT support), so that it only alter the relevant cpumask when there is the actual need for this. (This is only for reduced overhead, behavior remains the same). Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> master commit: a76645240bd14e964e85dbc975a8989edea6aa27 master date: 2017-03-01 16:56:34 +0000 --- xen/common/sched_credit2.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 4e34111..c11148e 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -476,6 +476,13 @@ __runq_remove(struct csched2_vcpu *svc) void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_vcpu *, s_time_t); +static inline void +tickle_cpu(unsigned int cpu, struct csched2_runqueue_data *rqd) +{ + cpumask_set_cpu(cpu, &rqd->tickled); + cpu_raise_softirq(cpu, SCHEDULE_SOFTIRQ); +} + /* Check to see if the item on the runqueue is higher priority than what's * currently running; if so, wake up the processor */ static /*inline*/ void @@ -573,9 +580,8 @@ tickle: sizeof(d), (unsigned char *)&d); } - cpumask_set_cpu(ipid, &rqd->tickled); SCHED_STAT_CRANK(tickle_idlers_some); - cpu_raise_softirq(ipid, SCHEDULE_SOFTIRQ); + tickle_cpu(ipid, rqd); no_tickle: return; @@ -946,7 +952,7 @@ csched2_vcpu_sleep(const struct scheduler *ops, struct vcpu *vc) SCHED_STAT_CRANK(vcpu_sleep); if ( curr_on_cpu(vc->processor) == vc ) - cpu_raise_softirq(vc->processor, SCHEDULE_SOFTIRQ); + tickle_cpu(vc->processor, svc->rqd); else if ( __vcpu_on_runq(svc) ) { BUG_ON(svc->rqd != RQD(ops, vc->processor)); @@ -1212,8 +1218,8 @@ static void migrate(const struct scheduler *ops, svc->migrate_rqd = trqd; set_bit(_VPF_migrating, &svc->vcpu->pause_flags); set_bit(__CSFLAG_runq_migrate_request, &svc->flags); - cpu_raise_softirq(svc->vcpu->processor, SCHEDULE_SOFTIRQ); SCHED_STAT_CRANK(migrate_requested); + tickle_cpu(svc->vcpu->processor, svc->rqd); } else { -- 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |