|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v13 05/10] x86: dynamically attach/detach QoS monitoring service for a guest
>>> On 04.08.14 at 04:17, <dongxiao.xu@xxxxxxxxx> wrote:
> +/* Called with domain lock held, no pqos specific lock needed */
> +int pqos_monitor_alloc_rmid(struct domain *d)
> +{
> + unsigned int rmid;
> +
> + ASSERT(pqos_monitor_enabled());
> +
> + if ( d->arch.pqos_rmid > 0 )
> + return -EEXIST;
> +
> + for ( rmid = pqosm->rmid_min; rmid <= pqosm->rmid_max; rmid++ )
> + {
> + if ( pqosm->rmid_to_dom[rmid] != DOMID_INVALID)
> + continue;
> +
> + pqosm->rmid_to_dom[rmid] = d->domain_id;
> + break;
> + }
> +
> + /* No RMID available, assign RMID=0 by default */
> + if ( rmid > pqosm->rmid_max )
> + {
> + d->arch.pqos_rmid = 0;
> + return -EUSERS;
> + }
> + else
Pointless "else".
> + pqosm->rmid_inuse++;
This field only ever gets written, and hence is useless up to at least
here. Peeking forward I'm also not really certain it is useful at all.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |