Thread (4 messages) 4 messages, 3 authors, 2012-11-06

ARM: idle sleep time for hotplugged cpu

From: Taniya Das <hidden>
Date: 2012-11-05 03:53:41
Also in: linux-arm-msm

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help