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

RE: [Xen-devel] [PATCH 2/4] CPUIDLE: Avoid remnant LAPIC timerintr while

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 2/4] CPUIDLE: Avoid remnant LAPIC timerintr while force hpetbroadcast
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 11 Sep 2008 18:59:14 +0800
Cc:
Delivery-date: Thu, 11 Sep 2008 03:59:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C4EEB3AB.26F51%keir.fraser@xxxxxxxxxxxxx>
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>
References: <8FED46E8A9CA574792FC7AACAC38FE7701ACD18DCE@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C4EEB3AB.26F51%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AckSVfqaFjPrXqrARTKdgjxn6iTeJQA2DOERAAhrdiAAKqlasQAAe3Qg
Thread-topic: [Xen-devel] [PATCH 2/4] CPUIDLE: Avoid remnant LAPIC timerintr while force hpetbroadcast
>From: Keir Fraser
>Sent: 2008年9月11日 18:38
>
>On 10/9/08 15:25, "Wei, Gang" <gang.wei@xxxxxxxxx> wrote:
>
>>> It's not clear to me the disable/enable_LAPIC_timer() work 
>is worthwhile for
>>> the few timer interrupts it is likely to avoid. The other 
>bit of the patch
>>> is a good bugfix though. I've taken just the latter part.
>> 
>> Thanks for accept most of these patches. As to 
>disable/enable_LAPIC_timer(), I
>> add them because some platforms require the LAPIC timer intr 
>being disabled
>> before entering C3, otherwise there may be some unexpected 
>things. As a
>> reference, Linux kernel always do so.
>
>Can you point out where Linux does so? It's not obvious to me.

acpi_state_timer_broadcast
clockevents_notify
tick_notify
tick_broadcast_oneshot_control
clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN)
lapic_timer_setup:
        case CLOCK_EVT_MODE_SHUTDOWN:
                v = apic_read(APIC_LVTT);
                v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
                apic_write(APIC_LVTT, v);
                break;

>
>Also, in your patch, you unmask LVTT after reprogramming the 
>LAPIC counter.
>Isn't there a race where the LAPIC timer generates an 
>interrupt event before
>you unmask the LVTT and hence you lose the interrupt (since I 
>assume the
>LAPIC interrupt is basically an internal one-shot signal which 
>does not get
>latched in any way)? So you'd probably need to reprogram_timer(0), then
>enable the timer, then reprogram_timer(<actual value>).
>

You're correct. It will be fixed.

Thanks,
Kevin

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