WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] cpuidle: remove hpet access in hpet_broad

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] cpuidle: remove hpet access in hpet_broadcast_exit
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Jun 2010 10:45:16 -0700
Delivery-date: Mon, 21 Jun 2010 10:46:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1276761149 -3600
# Node ID 47655a695312af43c1dd163b22ab4adb02553f60
# Parent  919ffe9b60b543c9bb0baae450d994904635b708
cpuidle: remove hpet access in hpet_broadcast_exit

hpet_broadcast_exit calls reprogram_hpet to stop possible hpet intr if
the last deep-cstate waken up cpu is waken by unexpected intrs instead
of hpet broadcast handler. This can be removed without brings much
useless intrs, but bring chance for further optimization. It is a
tradeoff between grace & optimization.

BTW, move the cpumask set out of critial section in
hpet_broadcast_enter to shorten it.

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
---
 xen/arch/x86/hpet.c |    8 +-------
 1 files changed, 1 insertion(+), 7 deletions(-)

diff -r 919ffe9b60b5 -r 47655a695312 xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Thu Jun 17 08:51:25 2010 +0100
+++ b/xen/arch/x86/hpet.c       Thu Jun 17 08:52:29 2010 +0100
@@ -664,14 +664,12 @@ void hpet_broadcast_enter(void)
 
     /* Disable LAPIC timer interrupts. */
     disable_APIC_timer();
+    cpu_set(cpu, ch->cpumask);
 
     spin_lock(&ch->lock);
-
-    cpu_set(cpu, ch->cpumask);
     /* reprogram if current cpu expire time is nearer */
     if ( this_cpu(timer_deadline_end) < ch->next_event )
         reprogram_hpet_evt_channel(ch, this_cpu(timer_deadline_end), NOW(), 1);
-
     spin_unlock(&ch->lock);
 }
 
@@ -692,11 +690,7 @@ void hpet_broadcast_exit(void)
         raise_softirq(TIMER_SOFTIRQ);
 
     spin_lock_irq(&ch->lock);
-
     cpu_clear(cpu, ch->cpumask);
-    if ( cpus_empty(ch->cpumask) && ch->next_event != STIME_MAX )
-        reprogram_hpet_evt_channel(ch, STIME_MAX, 0, 0);
-
     spin_unlock_irq(&ch->lock);
 
     if ( ch != &legacy_hpet_event )

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] cpuidle: remove hpet access in hpet_broadcast_exit, Xen patchbot-unstable <=