From: George Anzinger <george@mvista.com>
To: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
mingo@elte.hu, linux-kernel <linux-kernel@vger.kernel.org>,
Rajesh Shah <rajesh.shah@intel.com>,
John Stultz <johnstul@us.ibm.com>, Andi Kleen <ak@suse.de>,
Asit K Mallick <asit.k.mallick@intel.com>
Subject: Re: [RFC][PATCH] i386 x86-64 Eliminate Local APIC timer interrupt
Date: Thu, 05 May 2005 13:45:58 -0700 [thread overview]
Message-ID: <427A8606.1050607@mvista.com> (raw)
In-Reply-To: <20050429172605.A23722@unix-os.sc.intel.com>
Venkatesh Pallipadi wrote:
> Background:
> Local APIC timer stops functioning when CPU is in C3 state. As a
> result the local APIC timer interrupt will fire at uncertain times, depending
> on how long we spend in C3 state. And this has two side effects
> * Idle balancing will not happen as we expect it to.
> * Kernel statistics for idle time will not be proper (as we get less LAPIC
> interrupts when we are idle). This can result in confusing other parts of
> kernel (like ondemand cpufreq governor) which depends on this idle stats.
>
>
> Proposed Fix:
> Attached is a prototype patch, that tries to eliminate the dependency on
> local APIC timer for update_process_times(). The patch gets rid of Local APIC
> timer altogether. We use the timer interrupt (IRQ 0) configured in
> broadcast mode in IOAPIC instead (Doesn't work with 8259).
> As changing anything related to basic timer interrupt is a little bit risky,
> I have a boot parameter currently ("useapictimer") to switch back to original
> local APIC timer way of doing things.
>
> This may seem like a overkill to solve this particular problem. But, I feel
> it simplifies things and will have other advantages:
> * Should help dynamick tick as one has to change only global timer interrupt
> freq with varying jiffies.
> * Reduces one interrupt per jiffy.
> * One less interrupt source to worry about.
>
Sorry I missed this when it came out, but, I think a better way to handle this
is to use an IPI. In the non-VST case it can be to all but self, while when a
given cpu is sleeping we can not send it to that cpu. The advantages are:
1) The broadcast has a race/ contention on the xtime lock. The read lock is
needed by all and the write lock taken by one. The IPI should be sent AFTER the
xtime write unlock.
2) It is easy to prune VST sleeping cpus from the list of all to wake.
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
next prev parent reply other threads:[~2005-05-05 20:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-30 0:26 [RFC][PATCH] i386 x86-64 Eliminate Local APIC timer interrupt Venkatesh Pallipadi
2005-04-30 0:46 ` Zwane Mwaikambo
2005-04-30 0:58 ` Zwane Mwaikambo
2005-04-30 1:13 ` Zwane Mwaikambo
2005-04-30 2:32 ` Andrew Morton
2005-05-02 16:38 ` Andi Kleen
2005-05-02 17:16 ` Venkatesh Pallipadi
2005-05-02 19:08 ` Andi Kleen
2005-05-02 20:27 ` Venkatesh Pallipadi
2005-05-03 14:17 ` Andi Kleen
2005-05-05 5:33 ` Len Brown
2005-05-05 12:19 ` Andi Kleen
2005-05-11 18:12 ` Tony Lindgren
2005-05-05 20:45 ` George Anzinger [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-30 2:43 Pallipadi, Venkatesh
2005-05-05 4:16 ` Len Brown
2005-05-05 12:03 ` Andi Kleen
2005-05-05 12:32 ` Maciej W. Rozycki
2005-04-30 2:55 Pallipadi, Venkatesh
2005-04-30 3:06 ` Andrew Morton
2005-05-02 21:19 ` Pavel Machek
2005-04-30 19:40 Protasevich, Natalie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=427A8606.1050607@mvista.com \
--to=george@mvista.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=asit.k.mallick@intel.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rajesh.shah@intel.com \
--cc=torvalds@osdl.org \
--cc=venkatesh.pallipadi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox