From: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>
To: "Jiang, Yunhong" <yunhong.jiang@intel.com>
Cc: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: Should I still use pm_timer as clock source for hrt mode
Date: Thu, 23 Apr 2015 10:15:19 -0300 [thread overview]
Message-ID: <20150423131519.GD28465@uudg.org> (raw)
In-Reply-To: <DDCAE26804250545B9934A2056554AA0208A7A44@ORSMSX112.amr.corp.intel.com>
On Tue, Apr 21, 2015 at 05:08:58PM +0000, Jiang, Yunhong wrote:
| Hi, all
| I noticed followed statement about TSC timer on
| https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO , " Since the TSC
| timer on PC platforms, as used in the previous versions, are now marked as
| unsuitable for hrt mode due to many lacks of functionalities and
| reliabilities, you will need i.E. pm_timer as provided by ACPI to use as
| clock source".
|
| I'm testing on Intel Xeon CPU E5-2640 and has "Switched to
| clocksource tsc" on kernel log, I think it mean the TSC on my system is
| stable and reliable enough to use as clock source, right? With the
| invariant and synchronized TSC support in latest hardware, can I assume
| generally TSC would be better than pm_timer?
Nowadays the clocksourse selection code is a bit smarter than it was a
while ago. Some TSC clocks will be reliable as long as your system does not
enter deeper C-states, some will stop in idle... the kernel will select TSC
as the preferred clocksource and will use it until the event that could
render that specific TSC unreliable happens. Then the next better
clocksource option will be selected.
And yes, reading the TSC is way faster and cheaper than reading pm_timer.
So, if TSC is available and is considered reliable, use the TSC.
Depending on your environment and operation parameters you could take some
extra steps to ensure the condition that would turn your TSC clock unreliable
never happens. E.g. avoid entering deeper C-states, booting with
idle=pool, ...
Of course, any these changes have an effect, be it in power consumption or
processor temperature. Be sure to understand that balance and then decide
whether the cost of a lighter clock (in terms of cost to read the current
time) is more important than saving a few Watts on the end of day.
Luis
next prev parent reply other threads:[~2015-04-23 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 17:08 Should I still use pm_timer as clock source for hrt mode Jiang, Yunhong
2015-04-23 13:15 ` Luis Claudio R. Goncalves [this message]
2015-04-24 18:15 ` Jiang, Yunhong
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=20150423131519.GD28465@uudg.org \
--to=lclaudio@uudg.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=yunhong.jiang@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