From: Dario Faggioli <dario.faggioli@citrix.com>
To: George Dunlap <george.dunlap@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: Thu, 6 Apr 2017 12:59:01 +0200 [thread overview]
Message-ID: <1491476341.18721.16.camel@citrix.com> (raw)
In-Reply-To: <f7e2b1cb-c3e4-2570-eb59-16b23c04b700@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 1458 bytes --]
On Mon, 2017-03-27 at 14:23 +0100, George Dunlap wrote:
> On 17/03/17 18:19, Dario Faggioli wrote:
> > --- 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.
>
Maybe:
domain_scheduler()
vcpu_scheduler()
or
dom_scheduler()
vcpu_scheduler()
I.e., basically getting rid of the 'get' part, which may misleadingly
hint at some kind of reference counting.
Or, also trading 'scheduler' for 'ops':
dom_ops()
vcpu_ops()
This is all I can come up with, my preference being
{dom,vcpu}_scheduler().
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-04-06 10:59 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
2017-03-27 15:13 ` Dario Faggioli
2017-04-06 10:59 ` Dario Faggioli [this message]
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=1491476341.18721.16.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=george.dunlap@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).