From: George Dunlap <george.dunlap@citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>,
xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v2 2/2] xen: sched: improve robustness (and rename) DOM2OP()
Date: Mon, 27 Mar 2017 14:23:07 +0100 [thread overview]
Message-ID: <f7e2b1cb-c3e4-2570-eb59-16b23c04b700@citrix.com> (raw)
In-Reply-To: <148977478448.22479.13625390869019347980.stgit@Palanthas.fritz.box>
On 17/03/17 18:19, Dario Faggioli wrote:
> Clarify and enforce (with ASSERTs) when the function
> is called on the idle domain, and explain in comments
> what it means and when it is ok to do so.
>
> While there, change the name of the function to a more
> self-explanatory one, and do the same to VCPU2OP.
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> ---
> Cc: George Dunlap <george.dunlap@citrix.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> ---
> Changes from v1:
> - new patch;
> - renamed VCPU2OP, as suggested during v1's review of patch 1.
> ---
> xen/common/schedule.c | 56 ++++++++++++++++++++++++++++++++-----------------
> 1 file changed, 37 insertions(+), 19 deletions(-)
>
> diff --git a/xen/common/schedule.c b/xen/common/schedule.c
> index d344b7c..fdb8ff4 100644
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -77,8 +77,25 @@ static struct scheduler __read_mostly ops;
> (( (opsptr)->fn != NULL ) ? (opsptr)->fn(opsptr, ##__VA_ARGS__ ) \
> : (typeof((opsptr)->fn(opsptr, ##__VA_ARGS__)))0 )
>
> -#define DOM2OP(_d) (((_d)->cpupool == NULL) ? &ops : ((_d)->cpupool->sched))
> -static inline struct scheduler *VCPU2OP(const struct vcpu *v)
> +static inline struct scheduler *dom_get_scheduler(const struct domain *d)
Hmm -- I agree that VCPU2OP is probably not the right name, but I'm not
a fan of the new name either; and I don't have an option I like better yet.
With your permission I'll check in the first patch and come back to this.
-George
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-27 13:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-17 18:19 [PATCH v2 0/2] xen: sched: don't call hooks of the wrong scheduler via VCPU2OP Dario Faggioli
2017-03-17 18:19 ` [PATCH v2 1/2] " Dario Faggioli
2017-03-17 18:27 ` Juergen Gross
2017-03-17 18:29 ` Juergen Gross
2017-03-20 8:01 ` Jan Beulich
2017-03-27 11:48 ` George Dunlap
2017-03-27 11:49 ` George Dunlap
2017-03-27 15:07 ` Dario Faggioli
2017-03-17 18:19 ` [PATCH v2 2/2] xen: sched: improve robustness (and rename) DOM2OP() Dario Faggioli
2017-03-27 13:23 ` George Dunlap [this message]
2017-03-27 15:13 ` Dario Faggioli
2017-04-06 10:59 ` Dario Faggioli
2017-04-06 11:06 ` Juergen Gross
2017-04-07 0:31 ` Dario Faggioli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7e2b1cb-c3e4-2570-eb59-16b23c04b700@citrix.com \
--to=george.dunlap@citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).