[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Scheduling groups, credit scheduler support



Mike D. Day, le Thu 29 Nov 2007 15:19:59 -0500, a écrit :
> +static inline struct csched_dom *get_master_dom(struct csched_dom *d)
> +{
> +    if ( d->is_member )
> +    {
> +        if ( get_domain(d->master->dom) )
> +            return d->master;
> +        BUG();
> +    }
> +    return NULL;
> +}
> +
> +static inline struct csched_dom *master_dom(struct csched_dom *d)
> +{
> +    if ( d->is_member )
> +        return d->master;
> +    return d;
> +}
> +

> +static inline void rem_member_from_master(struct csched_dom *member,
> +                                          struct csched_dom *master)
> +{
> +    reclaim_active_vcpus(master, member);
> +    member->is_member = 0;
> +    member->master = NULL;
> +    list_del(&member->group_elem);
> +    if (list_empty(&master->group))
> +        master->is_master = 0;
> +}

Mmm, isn't there a race condition between these, if somebody removes a
member in the middle of somebody else calling master_dom() or
get_master_dom()?

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.