From: Dario Faggioli <dario.faggioli@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
Harmandeep Kaur <write.harmandeep@gmail.com>
Cc: xen-devel@lists.xenproject.org, keir@xen.org,
ian.jackson@eu.citrix.com, ian.campbell@citrix.com, tim@xen.org
Subject: Re: [PATCH] sched_credit: Remove cpu argument to __runq_insert()
Date: Fri, 30 Oct 2015 17:33:46 +0100 [thread overview]
Message-ID: <1446222826.28782.156.camel@citrix.com> (raw)
In-Reply-To: <5633A7FE02000078000B04EB@prv-mh.provo.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1648 bytes --]
On Fri, 2015-10-30 at 10:25 -0600, Jan Beulich wrote:
> > > > On 30.10.15 at 16:09, <write.harmandeep@gmail.com> wrote:
> > --- a/xen/common/sched_credit.c
> > +++ b/xen/common/sched_credit.c
> > @@ -252,13 +252,12 @@ __runq_elem(struct list_head *elem)
> > }
> >
> > static inline void
> > -__runq_insert(unsigned int cpu, struct csched_vcpu *svc)
> > +__runq_insert(struct csched_vcpu *svc)
> > {
> > - const struct list_head * const runq = RUNQ(cpu);
> > + const struct list_head * const runq = RUNQ(svc->vcpu
> > ->processor);
>
> ... this being an inline function the change will likely make the
> compiler produce worse code, if only ...
>
> > struct list_head *iter;
> >
> > BUG_ON( __vcpu_on_runq(svc) );
> > - BUG_ON( cpu != svc->vcpu->processor );
>
> ... this was an ASSERT() instead of a BUG_ON() (which it looks like
> it should be).
>
Mmm... I'm sorry, but I'm not getting what you are actually suggesting.
Are you saying that we shouldn't make the change at all? Or that we
should make the change and also turn the BUG_ON() (the one that is left
in place) into an ASSERT()? Or that we should not mark the function as
'inline'?
Harman, perhaps, can you check the assembly code produced by the
compiler before and after your patch and report here what the
differences are?
Thanks and Regards,
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: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-10-30 16:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 15:09 [PATCH] sched_credit: Remove cpu argument to __runq_insert() Harmandeep Kaur
2015-10-30 16:25 ` Jan Beulich
2015-10-30 16:33 ` Dario Faggioli [this message]
2015-10-30 17:00 ` Jan Beulich
2015-11-02 11:01 ` Dario Faggioli
2015-11-03 10:16 ` George Dunlap
2015-11-03 12:38 ` Jan Beulich
2015-11-03 21:22 ` Dario Faggioli
2015-10-30 16:46 ` Dario Faggioli
2015-10-30 16:50 ` Harmandeep Kaur
2015-10-30 17:01 ` Dario Faggioli
2015-11-02 12:36 ` Wei Liu
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=1446222826.28782.156.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=JBeulich@suse.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=write.harmandeep@gmail.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.