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>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] Scheduling groups, credit scheduler support
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Mon, 17 Dec 2007 16:57:41 +0000
Delivery-date: Mon, 17 Dec 2007 08:58:51 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20071214170128.GM4296@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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> <20071214170128.GM4296@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Samuel Thibault, le Fri 14 Dec 2007 17:01:28 +0000, a écrit :
> 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 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()?

More precisely, there is one with SGRP_get_master, which doesn't take
the global scheduler lock before calling get_master_dom().

Samuel

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