From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932825AbbFIKM0 (ORCPT ); Tue, 9 Jun 2015 06:12:26 -0400 Received: from mail-bn1bn0109.outbound.protection.outlook.com ([157.56.110.109]:63223 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753505AbbFIKMU (ORCPT ); Tue, 9 Jun 2015 06:12:20 -0400 Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; amacapital.net; dkim=none (message not signed) header.d=none; X-WSS-ID: 0NPO9O7-08-7A9-02 X-M-MSG: Date: Tue, 9 Jun 2015 18:10:31 +0800 From: Huang Rui To: Peter Zijlstra CC: Borislav Petkov , Andy Lutomirski , Thomas Gleixner , "Rafael J. Wysocki" , Len Brown , John Stultz , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "Fengguang Wu" , Aaron Lu , "Suthikulpanit, Suravee" , "Li, Tony" , "Xue, Ken" Subject: Re: [PATCH v2 3/4] x86, mwaitt: introduce mwaix delay with a configurable timer Message-ID: <20150609101031.GC17030@hr-slim.amd.com> References: <1433819621-15093-1-git-send-email-ray.huang@amd.com> <1433819621-15093-4-git-send-email-ray.huang@amd.com> <20150609083103.GO3644@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150609083103.GO3644@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD039;1:zFt5PxFhPY0QbxIqyBb08ZwlRfRVTfN5uUdYF4o+aF+M22spZSA3ROb2kXJuZVL322LyzSo4rhe3L1+l88M0SoPO5MPgYUMWru89FeC2pWoX2zV0riya3lChEuw87wNDdjiXaRU1iOLar+pyqHwkEYkdfjO71Y6YScZpMswfOdAo1piLXxcdY9Q21Ww1yN6QmRwPzn1HX5Q+EVJ0ttnQ2Y8XeWhIxgk+Lmg3lbbQLPeT/jVdZruuuIL+LG37y6GAQxM6H3QgyK91kch6KDFg4I9iILAIwRSKo/oWFkhzWivn26eoBu23IJxK/jQqqogMN9Vje2uDCDcsKw2fpb55Ug== X-Forefront-Antispam-Report: CIP:165.204.84.222;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(979002)(6009001)(428002)(24454002)(51704005)(199003)(189002)(164054003)(106466001)(110136002)(92566002)(33656002)(189998001)(105586002)(2950100001)(77096005)(87936001)(53416004)(4001350100001)(46406003)(46102003)(62966003)(77156002)(83506001)(101416001)(54356999)(76176999)(50986999)(47776003)(86362001)(50466002)(97756001)(23726002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR02MB068;H:atltwp02.amd.com;FPR:;SPF:None;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB068; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(520003)(3002001);SRVR:BLUPR02MB068;BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB068; X-Forefront-PRVS: 06022AA85F X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2015 10:12:11.2957 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96;Ip=[165.204.84.222];Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB068 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 09, 2015 at 04:31:03PM +0800, Peter Zijlstra wrote: > On Tue, Jun 09, 2015 at 11:13:40AM +0800, Huang Rui wrote: > > MWAITX can enable a timer and a corresponding timer value specified in SW > > P0 clocks. The SW P0 frequency is the same with TSC. The timer provides an > > upper bound on how long the instruction waits before exiting. > > > > The implementation of delay function in kernel can lerverage the timer of > > MWAITX. This patch provides a new method (delay_mwaitx) to measure delay > > time. > > But does this actually default to mwaitx delay on capable hardware? If > you need to boot with that parameter it means nobody is ever going to > use this. Oh, I see. Actually, you're right. Maybe nobody except us will use it. Will update in V3. Thanks, Rui