[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.7] xen: credit2: always mark a tickled pCPU as... tickled!
commit 10debc05830127a9953ab481a25bd3fffa483878 Author: Dario Faggioli <dario.faggioli@xxxxxxxxxx> AuthorDate: Tue Mar 14 14:00:46 2017 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Mar 14 14:00:46 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 35dad15..f14dc9c 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -559,6 +559,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 @@ -660,9 +667,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; @@ -1027,7 +1033,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)); @@ -1308,8 +1314,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(cpu, SCHEDULE_SOFTIRQ); SCHED_STAT_CRANK(migrate_requested); + tickle_cpu(cpu, svc->rqd); } else { -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.7 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |