From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754000AbZHLT56 (ORCPT ); Wed, 12 Aug 2009 15:57:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753575AbZHLT56 (ORCPT ); Wed, 12 Aug 2009 15:57:58 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:56869 "EHLO e23smtp05.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752372AbZHLT55 (ORCPT ); Wed, 12 Aug 2009 15:57:57 -0400 Date: Thu, 13 Aug 2009 01:27:53 +0530 From: Dipankar Sarma To: Pavel Machek Cc: "Pallipadi, Venkatesh" , "Rafael J. Wysocki" , "Li, Shaohua" , Gautham R Shenoy , Joel Schopp , "Brown, Len" , Peter Zijlstra , Balbir Singh , Benjamin Herrenschmidt , Ingo Molnar , Vaidyanathan Srinivasan , "Darrick J. Wong" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 0/3] cpu: idle state framework for offline CPUs. Message-ID: <20090812195753.GA14649@in.ibm.com> Reply-To: dipankar@in.ibm.com References: <20090805142311.553.78286.stgit@sofia.in.ibm.com> <20090806015855.GA20596@sli10-desk.sh.intel.com> <20090809120818.GA1338@ucw.cz> <200908091522.02898.rjw@sisk.pl> <20090810081941.GA18649@elf.ucw.cz> <1249950137.11545.38184.camel@localhost.localdomain> <20090812115806.GK24339@elf.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090812115806.GK24339@elf.ucw.cz> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 12, 2009 at 01:58:06PM +0200, Pavel Machek wrote: > Hi! > > > May be having (to pick a number) 3 possible offline states for all > > platforms with one for halt equivalent and one for deepest possible that > > CPU can handle and one for deepest possible that platform likes for > > C-states may make sense. Will keeps things simpler in terms of usage > > expectations and possibly reduce the misuse oppurtubity? > > Maybe just going to the deepest offline state automatically is the > easiest option? In a native system, I think we should the platform-specific code export what makes sense. That may be just the lowest possible state only. Or may be more than one. In a virtualized system, we would want to do at least the following - 1. An offline configuration state where the hypervisor can take the cpu back and allocate it to another VM. 2. A low-power state where the guest indicates it doesn't need the CPU (and can be put in low power state) but doesn't want to give up its allocated cpu share. IOW, no visible configuration changes. So, in any case we would probably want more than one states. > cpu hotplug/unplug should be rare-enough operation that the latencies > do not really matter, right? As of now, from the platform perspective, I don't think low-power state latencies matter in this code path. The only thing that might have any relevance is electrical power-off technology and whether there may be any h/w specific issues restricting its use. I don't know that there will be any, but it may not be a good idea to prevent platforms from requiring the use of multiple "offline" states. Thanks Dipankar