From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arjan van de Ven Subject: Re: [PATCH 2/3] PERF(kernel): Cleanup power events Date: Mon, 25 Oct 2010 07:11:10 -0700 Message-ID: <4CC58FFE.2050700@linux.intel.com> References: <1287488171-25303-1-git-send-email-trenn@suse.de> <201010251303.04019.trenn@suse.de> <20101025115525.GB2237@elte.hu> <201010251455.17421.trenn@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <201010251455.17421.trenn@suse.de> Sender: linux-trace-users-owner@vger.kernel.org To: Thomas Renninger Cc: Ingo Molnar , Linus Torvalds , Andrew Morton , Thomas Gleixner , Masami Hiramatsu , Frank Eigler , Steven Rostedt , Kevin Hilman , Peter Zijlstra , linux-omap@vger.kernel.org, rjw@sisk.pl, linux-pm@lists.linux-foundation.org, linux-trace-users@vger.kernel.org, Jean Pihet , Pierre Tardy , Frederic Weisbecker , Tejun Heo , Mathieu Desnoyers List-Id: linux-omap@vger.kernel.org On 10/25/2010 5:55 AM, Thomas Renninger wrote: >> But the actual code does not actually deal with any 'state 0', does it? > It does. Not being idle is tracked by cpuidle driver as state 0 > (arch independent): > /sys/devices/system/cpu/cpu0/cpuidle/state0/ > halt/C1 on X86 is: > /sys/devices/system/cpu/cpu0/cpuidle/state1/ > ... state0 is still OS idle! the API is just weird for this, from a userspace perspective if the kernel picks this state 0 for the idle handler, the userspace app gets two events one for going to state 0 to enter the idle state one for going to state 0 to exit idle but they're the exact same event in your API. rather unpleasant from a userspace program perspective.... now I need to start tracking even more state on top in powertop to be able to make a guess at which of the two meanings a state 0 entry has.