ia64/xen-unstable

changeset 5798:d0a1154755c9

Fix zeroing of some counters and add a couple more
author djm@kirby.fc.hp.com
date Sun Jul 10 08:53:17 2005 -0700 (2005-07-10)
parents ca44d2dbb273
children 970f74591ffa
files xen/arch/ia64/hypercall.c xen/arch/ia64/privop.c xen/arch/ia64/xenmisc.c
line diff
     1.1 --- a/xen/arch/ia64/hypercall.c	Sat Jul 09 07:58:56 2005 -0700
     1.2 +++ b/xen/arch/ia64/hypercall.c	Sun Jul 10 08:53:17 2005 -0700
     1.3 @@ -34,7 +34,7 @@ ia64_hypercall (struct pt_regs *regs)
     1.4  	    case FW_HYPERCALL_PAL_CALL:
     1.5  		//printf("*** PAL hypercall: index=%d\n",regs->r28);
     1.6  		//FIXME: This should call a C routine
     1.7 -#if 1
     1.8 +#if 0
     1.9  		// This is very conservative, but avoids a possible
    1.10  		// (and deadly) freeze in paravirtualized domains due
    1.11  		// to a yet-to-be-found bug where pending_interruption
    1.12 @@ -47,8 +47,9 @@ ia64_hypercall (struct pt_regs *regs)
    1.13  #define SPURIOUS_VECTOR 15
    1.14  			pi = vcpu_check_pending_interrupts(v);
    1.15  			if (pi != SPURIOUS_VECTOR) {
    1.16 -				idle_when_pending++;
    1.17 -				pi = vcpu_pend_unspecified_interrupt(v);
    1.18 +				if (!v->vcpu_info->arch.pending_interruption)
    1.19 +					idle_when_pending++;
    1.20 +				vcpu_pend_unspecified_interrupt(v);
    1.21  //printf("idle w/int#%d pending!\n",pi);
    1.22  //this shouldn't happen, but it apparently does quite a bit!  so don't
    1.23  //allow it to happen... i.e. if a domain has an interrupt pending and
     2.1 --- a/xen/arch/ia64/privop.c	Sat Jul 09 07:58:56 2005 -0700
     2.2 +++ b/xen/arch/ia64/privop.c	Sun Jul 10 08:53:17 2005 -0700
     2.3 @@ -1040,6 +1040,7 @@ extern unsigned long vhpt_translate_coun
     2.4  extern unsigned long lazy_cover_count;
     2.5  extern unsigned long idle_when_pending;
     2.6  extern unsigned long pal_halt_light_count;
     2.7 +extern unsigned long context_switch_count;
     2.8  
     2.9  int dump_misc_stats(char *buf)
    2.10  {
    2.11 @@ -1050,6 +1051,7 @@ int dump_misc_stats(char *buf)
    2.12  	s += sprintf(s,"Physical translations: %d\n",phys_translate_count);
    2.13  	s += sprintf(s,"Idle when pending: %d\n",idle_when_pending);
    2.14  	s += sprintf(s,"PAL_HALT_LIGHT (no pending): %d\n",pal_halt_light_count);
    2.15 +	s += sprintf(s,"context switches: %d\n",context_switch_count);
    2.16  	s += sprintf(s,"Lazy covers: %d\n",lazy_cover_count);
    2.17  	return s - buf;
    2.18  }
    2.19 @@ -1061,6 +1063,9 @@ void zero_misc_stats(void)
    2.20  	phys_translate_count = 0;
    2.21  	vhpt_translate_count = 0;
    2.22  	lazy_cover_count = 0;
    2.23 +	pal_halt_light_count = 0;
    2.24 +	idle_when_pending = 0;
    2.25 +	context_switch_count = 0;
    2.26  }
    2.27  
    2.28  int dump_hyperprivop_counts(char *buf)
     3.1 --- a/xen/arch/ia64/xenmisc.c	Sat Jul 09 07:58:56 2005 -0700
     3.2 +++ b/xen/arch/ia64/xenmisc.c	Sun Jul 10 08:53:17 2005 -0700
     3.3 @@ -257,6 +257,8 @@ void *module_text_address(unsigned long 
     3.4  void cs10foo(void) {}
     3.5  void cs01foo(void) {}
     3.6  
     3.7 +unsigned long context_switch_count = 0;
     3.8 +
     3.9  // context_switch
    3.10  void context_switch(struct vcpu *prev, struct vcpu *next)
    3.11  {
    3.12 @@ -276,6 +278,7 @@ void context_switch(struct vcpu *prev, s
    3.13  	/* Housekeeping for prev domain */
    3.14  #endif // CONFIG_VTI
    3.15  
    3.16 +	context_switch_count++;
    3.17  	switch_to(prev,next,prev);
    3.18  #ifdef CONFIG_VTI
    3.19  	/* Post-setup for new domain */