From: Dario Faggioli <dario.faggioli@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Juergen Gross <JGross@suse.com>,
xen-devel@lists.xenproject.org,
George Dunlap <george.dunlap@citrix.com>
Subject: Re: [PATCH] xen: sched: don't call hooks of the wrong scheduler via VCPU2OP
Date: Fri, 17 Mar 2017 13:22:35 +0100 [thread overview]
Message-ID: <1489753355.15340.3.camel@citrix.com> (raw)
In-Reply-To: <58CBA17E02000078001441F0@prv-mh.provo.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1405 bytes --]
On Fri, 2017-03-17 at 01:42 -0600, Jan Beulich wrote:
> > > > On 16.03.17 at 22:30, <dario.faggioli@citrix.com> wrote:
> > +{
> > + struct domain *d = v->domain;
> > +
> > + if ( likely(d->cpupool != NULL) )
> > + return d->cpupool->sched;
> > +
> > + /* v->processor never changes for idle vcpus, so using it here
> > is safe */
> > + if ( likely(is_idle_domain(d)) )
> > + return per_cpu(scheduler, v->processor);
> > + else
> > + return &ops;
>
> Having read through the description, I don't think I can conclude
> why using &ops here is correct (or at least benign). And even if
> this was explained in the description, I think a brief comment
> would be rather desirable here (the more that it having been
> &ops implicitly was wrong before as per the description).
>
Well, looking at all the callers, basically we never return ops.
I guess I was being overly conservative about keeping somewhat intact
the implant of original code.
I'll send v2 with both a comment and an ASSERT() for making things more
clear.
Thanks,
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
prev parent reply other threads:[~2017-03-17 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 21:30 [PATCH] xen: sched: don't call hooks of the wrong scheduler via VCPU2OP Dario Faggioli
2017-03-17 5:28 ` Juergen Gross
2017-03-17 11:46 ` Dario Faggioli
2017-03-17 7:42 ` Jan Beulich
2017-03-17 12:22 ` Dario Faggioli [this message]
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=1489753355.15340.3.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=JBeulich@suse.com \
--cc=JGross@suse.com \
--cc=george.dunlap@citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.