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

Re: [Xen-devel] [PATCH 07/60] xen/sched: build a linked list of struct sched_unit



On Fri, 2019-07-19 at 07:07 +0200, Juergen Gross wrote:
> On 19.07.19 02:01, Dario Faggioli wrote:
> > On Tue, 2019-05-28 at 12:32 +0200, Juergen Gross wrote:
> > > 
> > How about a ',' between domain and build?
> 
> Okay.

> > "over all vcpus of a sched_unit" ?
> 
> Oh, of course!
> 
Thanks.

> > One question:
> > 
> > > @@ -279,8 +279,16 @@ struct vcpu
> > >   struct sched_unit {
> > >       struct vcpu           *vcpu;
> > >       void                  *priv;      /* scheduler private data
> > > */
> > > +    struct sched_unit     *next_in_list;
> > >   };
> > >   
> > > +#define for_each_sched_unit(d,
> > > e)                                         \
> > > +    for ( (e) = (d)->sched_unit_list; (e) != NULL; (e) = (e)-
> > > > next_in_list )
> > > +
> > > +#define for_each_sched_unit_vcpu(i,
> > > v)                                    \
> > > +    for ( (v) = (i)->vcpu; (v) != NULL && (v)->sched_unit ==
> > > (i);         \
> > > +          (v) = (v)->next_in_list )
> > > +
> > > 
> > So, here... sorry if it's me not seeing it, but why the
> > (v)->sched_unit == (i) check is necessary?
> > 
> > Do we expect to put in the list of vcpus of a particular unit,
> > vcpus
> > that are in another unit?
> 
> Yes. 
>
Ah!

> I'm making use of the fact that all vcpus in a unit are consecutive
> as I'm re-using the already existing list of vcpus in a domain:
> 
> dom->vcpu0->vcpu1->vcpu2->vcpu3
>        ^             ^
>        !             !
> unit0-+             !
>                      !
> unit2---------------+
> 
Ok, I see. Can you add a short comment, above the for_each_xxx
construct, about that?

"All vcpus from all sched units are kept in the same. Only iterate over
the ones from a particular unit"

Or something like this.

Regards
-- 
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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