mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	Andi Kleen <ak@suse.de>, Rohit Seth <rohit.seth@intel.com>,
	Len Brown <len.brown@intel.com>
Subject: [RFC][PATCH]i386,x86-64 Handle missing local APIC timer interrupts on C3 state
Date: Thu, 8 Dec 2005 18:08:38 -0800	[thread overview]
Message-ID: <20051208180837.A32524@unix-os.sc.intel.com> (raw)


Problem:
Processor C3 state and beyond will shut down the local APIC timer 
on variety of Intel processors. This will be a issue on systems with more than
one logical CPUs, as these systems depend on local APIC timer and timer 
interrupt for scheduling (idle_balance/busy_balance) and process accounting 
purposes. 
One of the side-effects of this is, the idle time reported for a CPU can be less
than the actual time is spends idling. As a result of this wrong idle time
being reported, ondemand governor and other similar programs that depend on
the idle statistics may get misled. ondemand governor will think system is 
less idle than it really is and will increase the CPU frequency unnecessarily, 
for example.

Solution:
After my failed attempt earlier  
(http://www.ussg.iu.edu/hypermail/linux/kernel/0504.3/1640.html),
I am back with another attempt.

The basic idea is to use the external timer interrupt and have one CPU broadcast
it to all the other C3 capable CPUs through an IPI. The C3 capable CPUs will 
disable local APIC timer. Note that C3 capability on a CPU can appear/disappear
during run-time. So, whether a CPU uses local APIC or timer interrupt broadcast
can change at run time. But, once a CPU is detected as C3 capable we start using
the broadcast mode (even when CPU is not really in C3).

This patch should be a noop on systems that does not support C3.

The patch is split into 3 parts
* remove sub-jiffy control in local APIC timer.
* i386 apic changes to switch from APIC timer to broadcast timer
* x86_64 apic changes to switch from APIC timer to broadcast timer

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Comments?

Thanks,
Venki



                 reply	other threads:[~2005-12-09  2:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20051208180837.A32524@unix-os.sc.intel.com \
    --to=venkatesh.pallipadi@intel.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rohit.seth@intel.com \
    --cc=torvalds@osdl.org \
    /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

all inboxes | Powered by JetHome®