[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
- To: Juergen Gross <JGross@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Dario Faggioli <dfaggioli@xxxxxxxx>
- Date: Fri, 19 Jul 2019 00:01:37 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dWArKBL34mW2Wlc/KKIE+/QLUsjA1Q9zkNCxklPE3+g=; b=GH/VnCNLvsbhSDZK8qViy6gdd2gmwbA3ReJIPwIy1jSSShvpiUbBZE5QrKbqCYg+sbyT2Kl43Rd8hz0fUTbQDo+0/6dYDQBGQ/63gnXMJIFVgJ8j5gy5Vckrev+eRatFw5gaVEOBpO26TLr+/Y6aN39j4jOxN5oJwluC7UhKRg6oKHcv6kVxqNrhVc1JgpK/umYWxQ9+UV4hGRKKiv5aIlJmaQC0FmeFwaU9GqOwIUExEem+9x35irsm51CSdG/3KLl0Zl914RGWfiPdKpKchrOXN5axhg7VvL/ydH1WcrEuan4MCM4ET0rqQhgSP2qVVNcbPEQm6ZECgT4/iX1DBA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YzEm9M1V4rAFSHQghGUc4bpXzgl9dKWwnW8NEmLhWuoxI75RNOriZo7sqsG7V0/gKZejn3hi3eo0X7nha9BbJYa4anx/HpbJKJXoF8rdCZcmANiQqP7Mc39ua1n90PEZfu6lh2qz6hxkLIx583el2GIuIIBVOXQQGOAjSIsz5Bg/rRMm8PizlFJIx1jByyMfuxOFJBBRS+e8Gv2vcOgfM9kL5mP+y0QYv/IuzmIR2y2LGgr1Y88PhjzU19h8E//C10zZWg5Ufs2Mar9zCgpkwmQu3ea+oBL5yrMsK4Ak3f8QKa9Vz+XBmY40/X79lKB8k5qvoz7nv7FoAvGb1C+yHQ==
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=dfaggioli@xxxxxxxx;
- Cc: "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, "konrad.wilk@xxxxxxxxxx" <konrad.wilk@xxxxxxxxxx>, "george.dunlap@xxxxxxxxxxxxx" <george.dunlap@xxxxxxxxxxxxx>, "ian.jackson@xxxxxxxxxxxxx" <ian.jackson@xxxxxxxxxxxxx>, "tim@xxxxxxx" <tim@xxxxxxx>, "julien.grall@xxxxxxx" <julien.grall@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>
- Delivery-date: Fri, 19 Jul 2019 00:02:37 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHVPcUiu1Sp9PA7KEakXcPYJ1SK6w==
- Thread-topic: [Xen-devel] [PATCH 07/60] xen/sched: build a linked list of struct sched_unit
On Tue, 2019-05-28 at 12:32 +0200, Juergen Gross wrote:
> In order to make it easy to iterate over sched_unit elements of a
> domain build a single linked list and add an iterator for it.
>
How about a ',' between domain and build?
> For completeness add another iterator for_each_sched_unit_vcpu()
> which
> will iterate over all vcpus if a sched_unit (right now only one).
> This
"over all vcpus of a sched_unit" ?
> will be needed later for larger scheduling granularity (e.g. cores).
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>
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?
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
|