xen-devel
Re: [Xen-devel] [PATCH] Scheduling groups, credit scheduler support
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
|
|
|