From: tdas@codeaurora.org (Taniya Das)
To: linux-arm-kernel@lists.infradead.org
Subject: idle_sleeptime calculation for hotplugged cpu
Date: Fri, 02 Nov 2012 23:42:38 +0530 [thread overview]
Message-ID: <50940D16.2020304@codeaurora.org> (raw)
Hello,
I was looking at the arch/arm/process.c:cpu_die, I was wondering why we
do not exit from NOHZ for a hotplugged/offline cpu?
If I understand correctly an offlined cpu too will enter
NOHz(tick_nohz_idle_enter) and update the idle_entrytime. The cpu will die
and it will reenter the idle thread and update idle_entrytime onces it
comes back online and only then it will exit NOHz, but time spent in sleep
idle_sleeptime will be wrongly calculated.
void cpu_idle(void)
{
.....
/* endless idle loop with no priority at all */
while (1) {
idle_notifier_call_chain(IDLE_START);
tick_nohz_idle_enter();--> Offline CPU entering NOHZ
rcu_idle_enter();
while (!need_resched()) {
#ifdef CONFIG_HOTPLUG_CPU
if (cpu_is_offline(smp_processor_id()))
cpu_die(); ---> CPU becomes offline and re-enter the idle thread without
exiting from NOHZ,
#endif
...
}
Is it a good idea to exit from NOHZ before cpu_die() or it could be
achieved in some other way? Please provide your
comments.
--
Thanks & Regards,
Taniya Das.
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121102/f2197fc1/attachment-0001.html>
reply other threads:[~2012-11-02 18:12 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=50940D16.2020304@codeaurora.org \
--to=tdas@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.