From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753834AbbETNUK (ORCPT ); Wed, 20 May 2015 09:20:10 -0400 Received: from www.linutronix.de ([62.245.132.108]:60717 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752522AbbETNUH (ORCPT ); Wed, 20 May 2015 09:20:07 -0400 Date: Wed, 20 May 2015 15:20:13 +0200 (CEST) From: Thomas Gleixner To: Ingo Molnar cc: Borislav Petkov , Huang Rui , Len Brown , "Rafael J. Wysocki" , x86@kernel.org, linux-kernel@vger.kernel.org, Fengguang Wu , Aaron Lu , Tony Li , =?ISO-8859-15?Q?Fr=E9d=E9ric_Weisbecker?= Subject: Re: [RFC PATCH 2/4] x86, mwaitt: introduce mwaitx idle with a configurable timer In-Reply-To: <20150520114125.GA31212@gmail.com> Message-ID: References: <1432022472-2224-1-git-send-email-ray.huang@amd.com> <1432022472-2224-3-git-send-email-ray.huang@amd.com> <20150519113121.GD4819@pd.tnic> <20150520085520.GA8566@gmail.com> <20150520091213.GA3645@pd.tnic> <20150520102258.GA21245@gmail.com> <20150520105032.GD3645@pd.tnic> <20150520111120.GA25215@gmail.com> <20150520112110.GG3645@pd.tnic> <20150520114125.GA31212@gmail.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 May 2015, Ingo Molnar wrote: > * Borislav Petkov wrote: > > > On Wed, May 20, 2015 at 01:11:20PM +0200, Ingo Molnar wrote: > > > - MWAITX takes a 'timeout' parameter, but otherwise behaves exactly > > > like MWAIT: i.e. once idle it won't exit idle on its own > > > > Let me quote the commit message: > > > > "MWAITT, another name is MWAITX (MWAIT with extensions), has a > > configurable timer that causes MWAITX to exit on expiration." > > Ah. A useful skill that is, being able to read. > > > You need to set the second bit in ECX to enable the timer. > > > > I guess if you don't, then you get normal MWAIT but then you don't > > need the timeout either... > > Yeah. > > So if it's a true timeout then we could use it to implement irq-less > timers: that's actually pretty useful, because it could be faster than > getting a local APIC timer irq, etc. Uurgh, NO NO NO! We have enough trouble with non functional timers already, we do not need another variant of those. We can supply the estimated sleep time though if that helps the PM controller underneath to select a state. That's more or less what we do in the governors as well. Thanks, tglx