From: George Dunlap <george.dunlap@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: george.dunlap@eu.citrix.com
Subject: [PATCH 1 of 5] credit2: Add context_saved scheduler callback
Date: Wed, 14 Apr 2010 11:26:19 +0100 [thread overview]
Message-ID: <2631707c54b38d3068ea.1271240779@silas> (raw)
In-Reply-To: <patchbomb.1271240778@silas>
2 files changed, 3 insertions(+)
xen/common/schedule.c | 2 ++
xen/include/xen/sched-if.h | 1 +
Because credit2 shares a runqueue between several cpus, it needs
to know when a scheduled-out process has finally been context-switched
away so that it can be added to the runqueue again. (Otherwise it may
be grabbed by another processor before the context has been properly
saved.)
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
diff -r c02cc832cb2d -r 2631707c54b3 xen/common/schedule.c
--- a/xen/common/schedule.c Tue Apr 13 18:19:33 2010 +0100
+++ b/xen/common/schedule.c Wed Apr 14 11:16:58 2010 +0100
@@ -923,6 +923,8 @@
/* Check for migration request /after/ clearing running flag. */
smp_mb();
+ SCHED_OP(context_saved, prev);
+
if ( unlikely(test_bit(_VPF_migrating, &prev->pause_flags)) )
vcpu_migrate(prev);
}
diff -r c02cc832cb2d -r 2631707c54b3 xen/include/xen/sched-if.h
--- a/xen/include/xen/sched-if.h Tue Apr 13 18:19:33 2010 +0100
+++ b/xen/include/xen/sched-if.h Wed Apr 14 11:16:58 2010 +0100
@@ -70,6 +70,7 @@
void (*sleep) (struct vcpu *);
void (*wake) (struct vcpu *);
+ void (*context_saved) (struct vcpu *);
struct task_slice (*do_schedule) (s_time_t);
next prev parent reply other threads:[~2010-04-14 10:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-14 10:26 [PATCH 0 of 5] Add credit2 scheduler (EXPERIMENTAL) George Dunlap
2010-04-14 10:26 ` George Dunlap [this message]
2010-04-14 10:26 ` [PATCH 2 of 5] credit2: Flexible cpu-to-schedule-spinlock mappings George Dunlap
2010-04-14 10:26 ` [PATCH 3 of 5] credit2: Add a scheduler-specific schedule trace class George Dunlap
2010-04-14 10:26 ` [PATCH 4 of 5] credit2: Add credit2 scheduler to hypervisor George Dunlap
2010-04-14 10:26 ` [PATCH 5 of 5] credit2: Add toolstack options to control credit2 scheduler parameters George Dunlap
[not found] ` <7db7f696-1f0b-44d0-8f7b-eea1be5167dd@default>
2010-04-14 14:29 ` [PATCH 0 of 5] Add credit2 scheduler (EXPERIMENTAL) George Dunlap
2010-04-14 14:52 ` Keir Fraser
2010-04-14 15:59 ` Dan Magenheimer
2010-04-14 16:23 ` Keir Fraser
2010-04-14 16:31 ` Dulloor
2010-04-14 16:36 ` Keir Fraser
2010-04-14 17:04 ` Dan Magenheimer
2010-04-14 16:46 ` Dan Magenheimer
2010-04-15 20:11 ` Dan Magenheimer
[not found] ` <4BC664E1.7090304@purdue.edu>
2010-04-15 13:53 ` George Dunlap
2010-04-15 16:46 ` Naresh Rapolu
2010-04-15 17:33 ` Dulloor
2010-04-15 18:57 ` Naresh Rapolu
[not found] ` <h2x940bcfd21004140841kcdffe330xff5d749d43392fe3@mail.gmail.com>
2010-04-15 14:17 ` George Dunlap
2010-04-17 20:29 ` Dulloor
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=2631707c54b38d3068ea.1271240779@silas \
--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).