Wei, Gang
2008-Jul-16 05:50 UTC
[Xen-devel] [PATCH] Adjust handle_hpet_broadcast to let it run better before broadcast exit
Adjust handle_hpet_broadcast to let it run better before broadcast exit Since hpet_broadcast_exit has been moved after interrupt enabled in C3 case, so adjust the handler of hpet broadcast to adapt to this. Meanwhile, remove a freqently executed debug print line to simplify the serial output. Signed-off-by: Wei Gang <gang.wei@intel.com> diff -r 63317b6c3eab xen/arch/x86/hpet.c --- a/xen/arch/x86/hpet.c Mon Jul 14 15:21:03 2008 +0100 +++ b/xen/arch/x86/hpet.c Wed Jul 16 12:43:52 2008 +0800 @@ -97,8 +97,6 @@ static int reprogram_hpet_evt_channel( delta = expire - now; if ( delta <= 0 ) { - printk(KERN_DEBUG "reprogram: expire(%"PRIx64") < " - "now(%"PRIx64")\n", expire, now); if ( !force ) return -ETIME; } @@ -142,12 +140,10 @@ static void handle_hpet_broadcast(struct { cpumask_t mask; s_time_t now, next_event; - int cpu, current_cpu = smp_processor_id(); + int cpu; spin_lock(&ch->lock); - if ( cpu_isset(current_cpu, ch->cpumask) ) - printk(KERN_DEBUG "WARNING: current cpu%d in bc_mask\n", current_cpu); again: ch->next_event = STIME_MAX; next_event = STIME_MAX; @@ -162,8 +158,6 @@ again: else if ( per_cpu(timer_deadline, cpu) < next_event ) next_event = per_cpu(timer_deadline, cpu); } - if ( per_cpu(timer_deadline, current_cpu) <= now ) - cpu_set(current_cpu, mask); /* wakeup the cpus which have an expired event. */ evt_do_broadcast(mask); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Wei, Gang
2008-Jul-16 08:33 UTC
RE: [Xen-devel] [PATCH] Adjust handle_hpet_broadcast to let it runbetter before broadcast exit
Resent as attachment. Jimmy On Wednesday, July 16, 2008 1:51 PM, Wei, Gang wrote:> Adjust handle_hpet_broadcast to let it run better before broadcastexit> > Since hpet_broadcast_exit has been moved after interrupt enabled in C3 > case, so adjust the handler of hpet broadcast to adapt to this. > Meanwhile, remove a freqently executed debug print line to simplifythe> serial output. > > Signed-off-by: Wei Gang <gang.wei@intel.com> > > diff -r 63317b6c3eab xen/arch/x86/hpet.c > --- a/xen/arch/x86/hpet.c Mon Jul 14 15:21:03 2008 +0100 > +++ b/xen/arch/x86/hpet.c Wed Jul 16 12:43:52 2008 +0800 > @@ -97,8 +97,6 @@ static int reprogram_hpet_evt_channel( > delta = expire - now; > if ( delta <= 0 ) > { > - printk(KERN_DEBUG "reprogram: expire(%"PRIx64") < " > - "now(%"PRIx64")\n", expire, now); > if ( !force ) > return -ETIME; > } > @@ -142,12 +140,10 @@ static void handle_hpet_broadcast(struct > { > cpumask_t mask; > s_time_t now, next_event; > - int cpu, current_cpu = smp_processor_id(); > + int cpu; > > spin_lock(&ch->lock); > > - if ( cpu_isset(current_cpu, ch->cpumask) ) > - printk(KERN_DEBUG "WARNING: current cpu%d in bc_mask\n", > current_cpu); > again: > ch->next_event = STIME_MAX; > next_event = STIME_MAX; > @@ -162,8 +158,6 @@ again: > else if ( per_cpu(timer_deadline, cpu) < next_event ) > next_event = per_cpu(timer_deadline, cpu); > } > - if ( per_cpu(timer_deadline, current_cpu) <= now ) > - cpu_set(current_cpu, mask); > > /* wakeup the cpus which have an expired event. */ > evt_do_broadcast(mask); > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Possibly Parallel Threads
- [PATCH] cpuidle: Fix for timer_deadline==0 case
- [xen-unstable test] 6714: regressions - FAIL
- [PATCH] Compiz Events
- 4 commits - configure.ac test/compiler.c test/.gitignore test/Makefile.am test/swfdec_test.c test/swfdec_test_function.c test/swfdec_test_function.h test/swfdec_test_global.c test/swfdec_test_initialize.as test/swfdec_test_initialize.h
- python for game menus needing mouse but with mwo=force