From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arjan van de Ven Subject: Re: [PATCH] x86, acpi, idle: Restructure the mwait idle routines Date: Wed, 20 Nov 2013 08:24:47 -0800 Message-ID: <528CE24F.5000604@linux.intel.com> References: <20131119090019.GJ3866@twins.programming.kicks-ass.net> <20131119090859.GC3694@twins.programming.kicks-ass.net> <20131119113153.GD3694@twins.programming.kicks-ass.net> <528B7433.7020507@linux.intel.com> <20131119145143.GK10022@twins.programming.kicks-ass.net> <20131119151338.GF3694@twins.programming.kicks-ass.net> <20131119130630.487da962@ultegra> <20131120102803.GO10022@twins.programming.kicks-ass.net> <20131120105837.GH3694@twins.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com ([134.134.136.20]:30385 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754258Ab3KTQY4 (ORCPT ); Wed, 20 Nov 2013 11:24:56 -0500 In-Reply-To: <20131120105837.GH3694@twins.programming.kicks-ass.net> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Peter Zijlstra , Jacob Pan Cc: lenb@kernel.org, rjw@rjwysocki.net, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, shaohua.li@intel.com, rui.zhang@intel.com, Mike Galbraith , Ingo Molnar , Thomas Gleixner , hpa@zytor.com On 11/20/2013 2:58 AM, Peter Zijlstra wrote: > On Wed, Nov 20, 2013 at 11:28:03AM +0100, Peter Zijlstra wrote: >> On Tue, Nov 19, 2013 at 01:06:30PM -0800, Jacob Pan wrote: >>> I applied this patch on top of upstream kernel (801a760) and found out >>> my machine completely failed to enter idle when nothing is running. >>> turbostate shows 100% C0. ftrace shows kernel coming in and out of idle >>> frequently. >>> >>> Both ACPI idle and intel_idle behaves the same way. I have to do the >>> following change to allow entering C-states again. > >> That doesn't make any sense; current_set_polling_and_test() returns the >> same thing need_resched() does. >> >> But you're right, intel_idle resides 100% in C0 and acpi_idle has 100% >> C1 residency... most weird. > > So pretty silly actually; you cannot do a store (any store) in between > monitor and mwait. you can just not to the cacheline you are watching (or things that alias with that)