From: George Dunlap <george.dunlap@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: george.dunlap@eu.citrix.com
Subject: [PATCH 1 of 2] scheduler: Add a per-scheduler yield callback
Date: Mon, 9 Aug 2010 12:20:50 +0100 [thread overview]
Message-ID: <1c9288cd2af3e7482348.1281352850@gdunlap-desktop> (raw)
In-Reply-To: <patchbomb.1281352849@gdunlap-desktop>
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
diff -r 6f07d9ac1e7c -r 1c9288cd2af3 xen/common/schedule.c
--- a/xen/common/schedule.c Thu Aug 05 14:41:14 2010 +0100
+++ b/xen/common/schedule.c Fri Aug 06 15:41:56 2010 +0100
@@ -641,6 +641,12 @@
/* Voluntarily yield the processor for this allocation. */
static long do_yield(void)
{
+ struct vcpu * v=current;
+
+ vcpu_schedule_lock_irq(v);
+ SCHED_OP(VCPU2OP(v), yield, v);
+ vcpu_schedule_unlock_irq(v);
+
TRACE_2D(TRC_SCHED_YIELD, current->domain->domain_id, current->vcpu_id);
raise_softirq(SCHEDULE_SOFTIRQ);
return 0;
diff -r 6f07d9ac1e7c -r 1c9288cd2af3 xen/include/xen/sched-if.h
--- a/xen/include/xen/sched-if.h Thu Aug 05 14:41:14 2010 +0100
+++ b/xen/include/xen/sched-if.h Fri Aug 06 15:41:56 2010 +0100
@@ -107,6 +107,7 @@
void (*sleep) (const struct scheduler *, struct vcpu *);
void (*wake) (const struct scheduler *, struct vcpu *);
+ void (*yield) (const struct scheduler *, struct vcpu *);
void (*context_saved) (const struct scheduler *, struct vcpu *);
struct task_slice (*do_schedule) (const struct scheduler *, s_time_t,
next prev parent reply other threads:[~2010-08-09 11:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 11:20 [PATCH 0 of 2] Scheduler: Implement yield for credit scheduler George Dunlap
2010-08-09 11:20 ` George Dunlap [this message]
2010-08-09 11:20 ` [PATCH 2 of 2] scheduler: Implement yield for credit1 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=1c9288cd2af3e7482348.1281352850@gdunlap-desktop \
--to=george.dunlap@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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).