From: Harmandeep Kaur <write.harmandeep@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: keir@xen.org, ian.campbell@citrix.com, tim@xen.org,
dario.faggioli@citrix.com, ian.jackson@eu.citrix.com,
jbeulich@suse.com, Harmandeep Kaur <write.harmandeep@gmail.com>
Subject: [PATCH] sched_credit: Remove cpu argument to __runq_insert()
Date: Fri, 30 Oct 2015 20:39:53 +0530 [thread overview]
Message-ID: <1446217794-22320-1-git-send-email-write.harmandeep@gmail.com> (raw)
__runq_insert() takes two arguments, cpu and svc. However,
the cpu argument is redundant because we can get all the
information we need about cpu from svc.
Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
---
xen/common/sched_credit.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
index b8f28fe..5d73706 100644
--- 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);
struct list_head *iter;
BUG_ON( __vcpu_on_runq(svc) );
- BUG_ON( cpu != svc->vcpu->processor );
list_for_each( iter, runq )
{
@@ -905,7 +904,7 @@ csched_vcpu_insert(const struct scheduler *ops, struct vcpu *vc)
struct csched_vcpu *svc = vc->sched_priv;
if ( !__vcpu_on_runq(svc) && vcpu_runnable(vc) && !vc->is_running )
- __runq_insert(vc->processor, svc);
+ __runq_insert(svc);
SCHED_STAT_CRANK(vcpu_insert);
}
@@ -1016,7 +1015,7 @@ csched_vcpu_wake(const struct scheduler *ops, struct vcpu *vc)
}
/* Put the VCPU on the runq and tickle CPUs */
- __runq_insert(cpu, svc);
+ __runq_insert(svc);
__runq_tickle(cpu, svc);
}
@@ -1681,7 +1680,7 @@ csched_schedule(
* Select next runnable local VCPU (ie top of local runq)
*/
if ( vcpu_runnable(current) )
- __runq_insert(cpu, scurr);
+ __runq_insert(scurr);
else
BUG_ON( is_idle_vcpu(current) || list_empty(runq) );
--
1.9.1
next reply other threads:[~2015-10-30 15:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 15:09 Harmandeep Kaur [this message]
2015-10-30 16:25 ` [PATCH] sched_credit: Remove cpu argument to __runq_insert() Jan Beulich
2015-10-30 16:33 ` Dario Faggioli
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=1446217794-22320-1-git-send-email-write.harmandeep@gmail.com \
--to=write.harmandeep@gmail.com \
--cc=dario.faggioli@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--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.