From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Juergen Gross <jgross@suse.com>, Wei Liu <wei.liu2@citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Dario Faggioli <dario.faggioli@citrix.com>,
Tim Deegan <tim@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: [PATCH 1/3] libxc: Revert "do some retries in xc_cpupool_removecpu() for EBUSY case"
Date: Thu, 14 Apr 2016 18:07:38 +0100 [thread overview]
Message-ID: <1460653660-6654-2-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1460653660-6654-1-git-send-email-ian.jackson@eu.citrix.com>
libxc may be called from within long-running daemons such as libvirt.
In such a system this sleep would enable an uncooperative or buggy
guest to block all toolstack operations for an extended period.
Sadly, therefore, such a retry loop is not feasible without a lot of
engineering which is probably not appropriate.
This reverts commit 1ef6beea187bca8d11152b6c7d987b2b9450f936
"libxc: do some retries in xc_cpupool_removecpu() for EBUSY case"
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Dario Faggioli <dario.faggioli@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
tools/libxc/xc_cpupool.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/tools/libxc/xc_cpupool.c b/tools/libxc/xc_cpupool.c
index 261b9c9..c42273e 100644
--- a/tools/libxc/xc_cpupool.c
+++ b/tools/libxc/xc_cpupool.c
@@ -20,7 +20,6 @@
*/
#include <stdarg.h>
-#include <unistd.h>
#include "xc_private.h"
static int do_sysctl_save(xc_interface *xch, struct xen_sysctl *sysctl)
@@ -138,34 +137,17 @@ int xc_cpupool_addcpu(xc_interface *xch,
return do_sysctl_save(xch, &sysctl);
}
-/*
- * The hypervisor might return EBUSY when trying to remove a cpu from a
- * cpupool when a domain running in this cpupool has pinned a vcpu
- * temporarily. Do some retries in this case, perhaps the situation
- * cleans up.
- */
-#define NUM_RMCPU_BUSY_RETRIES 5
-
int xc_cpupool_removecpu(xc_interface *xch,
uint32_t poolid,
int cpu)
{
- unsigned retries;
- int err;
DECLARE_SYSCTL;
sysctl.cmd = XEN_SYSCTL_cpupool_op;
sysctl.u.cpupool_op.op = XEN_SYSCTL_CPUPOOL_OP_RMCPU;
sysctl.u.cpupool_op.cpupool_id = poolid;
sysctl.u.cpupool_op.cpu = (cpu < 0) ? XEN_SYSCTL_CPUPOOL_PAR_ANY : cpu;
- for ( retries = 0; retries < NUM_RMCPU_BUSY_RETRIES; retries++ ) {
- err = do_sysctl_save(xch, &sysctl);
- if ( err < 0 && errno == EBUSY )
- sleep(1);
- else
- break;
- }
- return err;
+ return do_sysctl_save(xch, &sysctl);
}
int xc_cpupool_movedomain(xc_interface *xch,
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-14 17:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 17:07 [PATCH 0/3] Revert xc cpupool retries and document anomaly Ian Jackson
2016-04-14 17:07 ` Ian Jackson [this message]
2016-04-15 5:15 ` [PATCH 1/3] libxc: Revert "do some retries in xc_cpupool_removecpu() for EBUSY case" Juergen Gross
2016-04-15 7:46 ` Dario Faggioli
2016-04-14 17:07 ` [PATCH 2/3] xen: hypercall docs annotations for xen_sysctl_cpupool_op Ian Jackson
2016-04-14 20:37 ` Dario Faggioli
2016-04-15 10:27 ` Ian Jackson
2016-04-14 17:07 ` [PATCH 3/3] xen: Document XEN_SYSCTL_CPUPOOL_OP_RMCPU anomalous EBUSY result Ian Jackson
2016-04-14 17:24 ` Andrew Cooper
2016-04-14 17:56 ` Ian Jackson
2016-04-14 20:22 ` Dario Faggioli
2016-04-15 10:20 ` Ian Jackson
2016-04-15 10:43 ` Juergen Gross
2016-04-15 10:58 ` Dario Faggioli
2016-04-15 11:37 ` Juergen Gross
2016-04-15 13:20 ` Juergen Gross
2016-04-15 13:33 ` Dario Faggioli
2016-04-15 14:11 ` Ian Jackson
2016-04-15 14:39 ` Juergen Gross
2016-04-15 5:35 ` Juergen Gross
2016-04-15 7:42 ` Dario Faggioli
2016-04-15 14:12 ` Ian Jackson
2016-04-15 14:17 ` Konrad Rzeszutek Wilk
2016-04-15 14:34 ` Juergen Gross
2016-04-15 14:44 ` Ian Jackson
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=1460653660-6654-2-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=tim@xen.org \
--cc=wei.liu2@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).