From: Andrew Cooper Subject: [PATCH for-4.5] xen/common: Process softirqs while dumping domains Date: Wed, 29 Oct 2014 15:08:46 +0000 Message-ID: <1414595326-14257-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org 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 CC: Keir Fraser CC: Jan Beulich CC: Konrad Rzeszutek Wilk --- 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