WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "Mike D. Day" <ncmike@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Scheduling groups, credit scheduler support
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Fri, 14 Dec 2007 17:01:28 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 14 Dec 2007 09:02:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20071129201959.GC12559@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, "Mike D. Day" <ncmike@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <20071129201959.GC12559@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
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