* [PATCH for-4.5] xen/common: Process softirqs while dumping domains
@ 2014-10-29 15:08 Andrew Cooper
2014-10-29 17:11 ` Dario Faggioli
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cooper @ 2014-10-29 15:08 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Keir Fraser, Jan Beulich
Process softirqs once per domain, and once every 64 vcpus in a guest to avoid
being hit by the NMI watchdog. Discovered against a VM which had accidentally
been assigned 8192 vcpus.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
xen/common/keyhandler.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 809378c..c9d9206 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -253,6 +253,9 @@ static void dump_domains(unsigned char key)
for_each_domain ( d )
{
unsigned int i;
+
+ process_pending_softirqs();
+
printk("General information for domain %u:\n", d->domain_id);
cpuset_print(tmpstr, sizeof(tmpstr), d->domain_dirty_cpumask);
printk(" refcnt=%d dying=%d pause_count=%d\n",
@@ -287,6 +290,9 @@ static void dump_domains(unsigned char key)
d->domain_id);
for_each_vcpu ( d, v )
{
+ if ( (v->vcpu_id & 0x3f) == 0 )
+ process_pending_softirqs();
+
printk(" VCPU%d: CPU%d [has=%c] poll=%d "
"upcall_pend = %02x, upcall_mask = %02x ",
v->vcpu_id, v->processor,
@@ -311,6 +317,9 @@ static void dump_domains(unsigned char key)
{
for_each_vcpu ( d, v )
{
+ if ( (v->vcpu_id & 0x3f) == 0 )
+ process_pending_softirqs();
+
printk("Notifying guest %d:%d (virq %d, port %d)\n",
d->domain_id, v->vcpu_id,
VIRQ_DEBUG, v->virq_to_evtchn[VIRQ_DEBUG]);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH for-4.5] xen/common: Process softirqs while dumping domains
2014-10-29 15:08 [PATCH for-4.5] xen/common: Process softirqs while dumping domains Andrew Cooper
@ 2014-10-29 17:11 ` Dario Faggioli
0 siblings, 0 replies; 2+ messages in thread
From: Dario Faggioli @ 2014-10-29 17:11 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Keir Fraser, Jan Beulich, Xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1225 bytes --]
On Wed, 2014-10-29 at 15:08 +0000, Andrew Cooper wrote:
> Process softirqs once per domain, and once every 64 vcpus in a guest to avoid
> being hit by the NMI watchdog. Discovered against a VM which had accidentally
> been assigned 8192 vcpus.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Personally...
> diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
> index 809378c..c9d9206 100644
> --- a/xen/common/keyhandler.c
> +++ b/xen/common/keyhandler.c
> @@ -287,6 +290,9 @@ static void dump_domains(unsigned char key)
> d->domain_id);
> for_each_vcpu ( d, v )
> {
> + if ( (v->vcpu_id & 0x3f) == 0 )
> + process_pending_softirqs();
> +
>
... I think something like ( vcpu_id % 64 ) would have been more
readable, but I understand that's only a matter of taste. :-)
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-29 17:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29 15:08 [PATCH for-4.5] xen/common: Process softirqs while dumping domains Andrew Cooper
2014-10-29 17:11 ` Dario Faggioli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.