From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>
Subject: [PATCH 2/2] xen: cpupool: small optimization when moving between pools
Date: Thu, 14 Jul 2016 08:41:45 +0200 [thread overview]
Message-ID: <146847850570.25458.11601847684264900881.stgit@Solace.fritz.box> (raw)
In-Reply-To: <146847830772.25458.3001435525572823491.stgit@Solace.fritz.box>
If the domain is already where we want it to go,
there's not much to do indeed.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
---
Cc: Juergen Gross <jgross@suse.com>
---
xen/common/cpupool.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index 5dacc61..9998394 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -232,6 +232,9 @@ static int cpupool_move_domain_locked(struct domain *d, struct cpupool *c)
{
int ret;
+ if ( unlikely(d->cpupool == c) )
+ return 0;
+
d->cpupool->n_dom--;
ret = sched_move_domain(d, c);
if ( ret )
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-07-14 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-14 6:41 [PATCH 0/2] xen: cpupool (small) improvement and (latent) bug fix Dario Faggioli
2016-07-14 6:41 ` [PATCH 1/2] xen: fix a (latent) cpupool-related race during domain destroy Dario Faggioli
2016-07-14 9:37 ` Andrew Cooper
2016-07-14 14:54 ` Dario Faggioli
2016-07-14 14:55 ` Andrew Cooper
2016-07-14 6:41 ` Dario Faggioli [this message]
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=146847850570.25458.11601847684264900881.stgit@Solace.fritz.box \
--to=dario.faggioli@citrix.com \
--cc=jgross@suse.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 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).