[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: sched: rtds: refactor code
Hi Tianyang On Wed, May 11, 2016 at 11:20 AM, Tianyang Chen <tiche@xxxxxxxxxxxxxx> wrote: > No functional change: > -Various coding style fix > -Added comments for UPDATE_LIMIT_SHIFT. > > Use non-atomic bit-ops: > -Vcpu flags are checked and cleared atomically. Performance can be > improved with corresponding non-atomic versions since schedule.c > already has spin_locks in place. > > Suggested-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> It's better to add the link to the thread that has the suggestion. > @@ -930,7 +936,7 @@ burn_budget(const struct scheduler *ops, struct rt_vcpu > *svc, s_time_t now) > if ( svc->cur_budget <= 0 ) > { > svc->cur_budget = 0; > - set_bit(__RTDS_depleted, &svc->flags); > + __set_bit(__RTDS_depleted, &svc->flags); > } > > /* TRACE */ > @@ -955,7 +961,7 @@ burn_budget(const struct scheduler *ops, struct rt_vcpu > *svc, s_time_t now) > * lock is grabbed before calling this function The comment says "lock is grabbed before calling this function". IIRC, we use __ to represent that we grab the lock before call this function. Then this change violates the convention. > */ > static struct rt_vcpu * > -__runq_pick(const struct scheduler *ops, const cpumask_t *mask) > +runq_pick(const struct scheduler *ops, const cpumask_t *mask) > { > struct list_head *runq = rt_runq(ops); > struct list_head *iter; > @@ -964,9 +970,9 @@ __runq_pick(const struct scheduler *ops, const cpumask_t > *mask) > cpumask_t cpu_common; > cpumask_t *online; > > - list_for_each(iter, runq) > + list_for_each ( iter, runq ) > { > - iter_svc = __q_elem(iter); > + iter_svc = q_elem(iter); > > /* mask cpu_hard_affinity & cpupool & mask */ > online = cpupool_domain_cpumask(iter_svc->vcpu->domain); > @@ -1028,7 +1034,7 @@ rt_schedule(const struct scheduler *ops, s_time_t now, > bool_t tasklet_work_sched > } > else > { > - snext = __runq_pick(ops, cpumask_of(cpu)); > + snext = runq_pick(ops, cpumask_of(cpu)); > if ( snext == NULL ) > snext = rt_vcpu(idle_vcpu[cpu]); > Meng ----------- Meng Xu PhD Student in Computer and Information Science University of Pennsylvania http://www.cis.upenn.edu/~mengxu/ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |