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-devel

[Xen-devel] [PATCH 2/4] CPUIDLE: Avoid remnant LAPIC timer intr while fo

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2/4] CPUIDLE: Avoid remnant LAPIC timer intr while force hpetbroadcast
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Tue, 9 Sep 2008 16:28:04 +0800
Accept-language: en-US
Acceptlanguage: en-US
Delivery-date: Tue, 09 Sep 2008 01:28:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AckSVfqaFjPrXqrARTKdgjxn6iTeJQ==
Thread-topic: [PATCH 2/4] CPUIDLE: Avoid remnant LAPIC timer intr while force hpetbroadcast
CPUIDLE: Avoid remnant LAPIC timer intr while force hpetbroadcast

LAPIC will stop during C3, and resume to work after exit from C3. Considering 
below case:
The LAPIC timer was programmed to expire after 1000us, but CPU enter C3 after 
100us and exit C3 at 9xxus.

   0us: reprogram_timer(1000us)
 100us: entry C3, LAPIC timer stop
 9xxus: exit C3 due to unexpected event, LAPIC timer continue running
10xxus: reprogram_timer(1000us), fail due to the past expiring time.
......: no timer softirq raised, no change to LAPIC timer.
......: if entry C3 again, HPET will be forced reprogramed to now+small_slop.
......: if entry C2, no change to LAPIC.
18xxus: LAPIC timer expires unexpectedly if no C3 entries after 10xxus.

>From above sequences, we can find this case will either introduce extra HPET 
>intrs or put off the softtimer expiring.
This patch simply stops the LAPIC timer first (avoid immediate unnecessary 
expiring) and raise a softirq (continue the softtimer handling process, which 
will correct the LAPIC timer) when reprogram LAPIC timer fails.

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>

Attachment: cancel_useless_timer_intr_0909.patch
Description: cancel_useless_timer_intr_0909.patch

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