|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] [PATCH 2/4] CPUIDLE: Avoid remnant LAPIC timerintr while
>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
|
|
|
|
|