From: Andi Kleen <andi@firstfloor.org>
To: Rohit Vaswani <rvaswani@codeaurora.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: CPU Hotplug add/remove optimizations
Date: Tue, 03 Aug 2010 10:07:58 +0200 [thread overview]
Message-ID: <87y6codspt.fsf@basil.nowhere.org> (raw)
In-Reply-To: <4C5742FE.5040907@codeaurora.org> (Rohit Vaswani's message of "Mon, 02 Aug 2010 15:13:18 -0700")
Rohit Vaswani <rvaswani@codeaurora.org> writes:
> Hi,
>
> We are trying to use cpu hotplug to turn off a cpu when it is not in
> use to improve power management.
It might not be a big issue on smaller systems, but CPU hotunplug
involves stop_machine() and that is a very costly thing
to do as systems become larger.
> I am trying to optimize the cpu
> hotplug add and cpu hotplug remove timings. Currently cpu hotplug add
> takes around 250ms and cpu hotplug remove takes 190 ms. For the
> current purposes we want to assume that we are removing and adding the
> same core. It seems that since we are actually not replacing the core
> there could be a lot of initialization overhead that could be
> saved and restored instead of calibrating the entire core again.
> One such thing we have been looking at is that once a core is powered
> up during cpu hotplug add, it runs the calibrate_delay routine to
> calculate the value of loops_per_jiffy. In such a case could we bypass
> the calibrate_delay function and just save and restore the value of
> loops_per_jiffy?
> Does this approach seem wrong to anyone?
It's wrong on a system that supports socket hotplug. The CPU you're
power up again might not be the same.
In theory you could have some low level interface that distingushes
these two cases, but right now that's not there.
> Can we safely assume that the core will start at the same clock speed
> at which the value was stored and then restored?
That neither.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2010-08-03 8:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 22:13 CPU Hotplug add/remove optimizations Rohit Vaswani
2010-08-03 8:07 ` Andi Kleen [this message]
2010-08-06 20:06 ` Rohit Vaswani
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=87y6codspt.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rvaswani@codeaurora.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