From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:14595 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752232Ab0HBWNS (ORCPT ); Mon, 2 Aug 2010 18:13:18 -0400 Message-ID: <4C5742FE.5040907@codeaurora.org> Date: Mon, 02 Aug 2010 15:13:18 -0700 From: Rohit Vaswani MIME-Version: 1.0 Subject: CPU Hotplug add/remove optimizations Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-arm-msm-owner@vger.kernel.org List-ID: To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, rvaswani@codeaurora.org Hi, We are trying to use cpu hotplug to turn off a cpu when it is not in use to improve power management. 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? Can we safely assume that the core will start at the same clock speed at which the value was stored and then restored? And thus keeping the value of loops_per_jiffy that we restored consistent with the rest of the system. Does anyone else have other ideas to achieve better results? I will be looking at implementing any solutions and advice and following up with metrics and results. Thanks, Rohit Vaswani -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.