From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian.Campbell@citrix.com, anup.patel@linaro.org,
stefano.stabellini@eu.citrix.com, george.dunlap@eu.citrix.com,
julien.grall@linaro.org, JBeulich@suse.com,
pranavkumar@linaro.org
Subject: [PATCH 1/2] xen: export do_yield as vcpu_yield
Date: Wed, 23 Jul 2014 13:05:02 +0100 [thread overview]
Message-ID: <1406117103-10584-1-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1407231300480.2293@kaball.uk.xensource.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: george.dunlap@eu.citrix.com
CC: JBeulich@suse.com
---
xen/common/schedule.c | 10 +++++-----
xen/include/xen/sched.h | 1 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index e9eb0bc..6631dc8 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -795,9 +795,8 @@ static long do_poll(struct sched_poll *sched_poll)
}
/* Voluntarily yield the processor for this allocation. */
-static long do_yield(void)
+void vcpu_yield(struct vcpu *v)
{
- struct vcpu * v=current;
spinlock_t *lock = vcpu_schedule_lock_irq(v);
SCHED_OP(VCPU2OP(v), yield, v);
@@ -805,7 +804,6 @@ static long do_yield(void)
TRACE_2D(TRC_SCHED_YIELD, current->domain->domain_id, current->vcpu_id);
raise_softirq(SCHEDULE_SOFTIRQ);
- return 0;
}
static void domain_watchdog_timeout(void *data)
@@ -888,7 +886,8 @@ long do_sched_op_compat(int cmd, unsigned long arg)
{
case SCHEDOP_yield:
{
- ret = do_yield();
+ vcpu_yield(current);
+ ret = 0;
break;
}
@@ -925,7 +924,8 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
{
case SCHEDOP_yield:
{
- ret = do_yield();
+ vcpu_yield(current);
+ ret = 0;
break;
}
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 2f876f5..b99a8d3 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -634,6 +634,7 @@ int sched_id(void);
void sched_tick_suspend(void);
void sched_tick_resume(void);
void vcpu_wake(struct vcpu *v);
+void vcpu_yield(struct vcpu *v);
void vcpu_sleep_nosync(struct vcpu *v);
void vcpu_sleep_sync(struct vcpu *v);
--
1.7.10.4
next prev parent reply other threads:[~2014-07-23 12:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 12:04 [PATCH 0/2] xen/arm: vcpu_yield on WFE Stefano Stabellini
2014-07-23 12:05 ` Stefano Stabellini [this message]
2014-07-23 12:14 ` [PATCH 1/2] xen: export do_yield as vcpu_yield Ian Campbell
2014-07-23 12:58 ` George Dunlap
2014-07-23 13:04 ` Stefano Stabellini
2014-07-23 13:07 ` George Dunlap
2014-07-23 12:05 ` [PATCH 2/2] xen/arm: call vcpu_yield on WFE trap Stefano Stabellini
2014-07-23 13:11 ` George Dunlap
2014-07-23 13:13 ` Stefano Stabellini
2014-07-23 13:29 ` George Dunlap
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=1406117103-10584-1-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=anup.patel@linaro.org \
--cc=george.dunlap@eu.citrix.com \
--cc=julien.grall@linaro.org \
--cc=pranavkumar@linaro.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 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).