|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] sched_credit: Remove cpu argument to __runq_insert()
>>> On 30.10.15 at 16:09, <write.harmandeep@xxxxxxxxx> wrote:
> __runq_insert() takes two arguments, cpu and svc. However,
> the cpu argument is redundant because we can get all the
> information we need about cpu from svc.
While true and looking like an improvement at the source level, ...
> --- a/xen/common/sched_credit.c
> +++ b/xen/common/sched_credit.c
> @@ -252,13 +252,12 @@ __runq_elem(struct list_head *elem)
> }
>
> static inline void
> -__runq_insert(unsigned int cpu, struct csched_vcpu *svc)
> +__runq_insert(struct csched_vcpu *svc)
> {
> - const struct list_head * const runq = RUNQ(cpu);
> + const struct list_head * const runq = RUNQ(svc->vcpu->processor);
... this being an inline function the change will likely make the
compiler produce worse code, if only ...
> struct list_head *iter;
>
> BUG_ON( __vcpu_on_runq(svc) );
> - BUG_ON( cpu != svc->vcpu->processor );
... this was an ASSERT() instead of a BUG_ON() (which it looks like
it should be).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |