Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758895AbcDHUIL (ORCPT ); Fri, 8 Apr 2016 16:08:11 -0400 Received: from mail-bn1on0144.outbound.protection.outlook.com ([157.56.110.144]:17504 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754202AbcDHUIJ (ORCPT ); Fri, 8 Apr 2016 16:08:09 -0400 Authentication-Results: amacapital.net; dkim=none (message not signed) header.d=none;amacapital.net; dmarc=none action=none header.from=hpe.com; Message-ID: <57080F9E.7010904@hpe.com> Date: Fri, 8 Apr 2016 16:07:58 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Andy Lutomirski CC: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , X86 ML , Jiang Liu , Borislav Petkov , Andy Lutomirski , Scott J Norton , Douglas Hatch , Randy Wright Subject: Re: [PATCH] x86/hpet: Reduce HPET counter read contention References: <1459951324-53339-1-git-send-email-Waiman.Long@hpe.com> <570677BD.1000800@hpe.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [72.71.243.129] X-ClientProxiedBy: CY1PR08CA0014.namprd08.prod.outlook.com (10.163.94.152) To CS1PR84MB0309.NAMPRD84.PROD.OUTLOOK.COM (10.162.189.158) X-MS-Office365-Filtering-Correlation-Id: e3421082-99d7-4f1f-bd5a-08d35fe97eec X-Microsoft-Exchange-Diagnostics: 1;CS1PR84MB0309;2:yPj+ChHwMtI1SoeV+o03fIwc2jfTKlGQSbhzwRwzqZ9QZl7fx3fRKV01AEkuubjMmPdIaiGE26VfFmkyq5HdfY3Fcc6ndsjFhwYnRQ2CczhZO/+pO9F1SYiym9jkdBpjtXbNO8ISk2zrPUe/tJOYPM5RGw9ibtqHdES7IsdVRFjUiN/seco9x74SX1+H+/1U;3:xVhKWM0W+AOZUO1+sGJFCU3h1e8pueCSo0J0TCoiiBULVT4VJEN0eI9I3cI95CdSb8h5NZ8kx/pBjE6pWRyyg+7FioUlD5JiDaVkJ2Gcf/COrOkDp6fKT6kE+XTJGreF;25:m/U2tszAZwGtog4CiK8F41nZCv7DTLBdmYq7scceWHIUR3ihPhJAP0Sq1kDsxAHE09Yv9ruWQCfKVbyJqrxL3WdNRz/ACr3VFRg9/LTMn1I3cefL3Umzfqki9MR6dpb7/NyFDcgaQyyx5hjuHJouqZo6nM+dsvTMWgAlxlBG3NRelGBJFXN5+6F113QSlr+JSOsMn26XxwFPzydg7vipmhVI427VuGjzqGZ2iKctnxE7xiMlW3M2dWKSxJn8vG2LbhkmAYB5yjI3UfJRV2ClD8bwVwYV5PzR4SABqgQdCUe3jbtCdElgTvCRamaUVSJSyaheA0GqJz2X4HruDfDKng== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CS1PR84MB0309; X-LD-Processed: 105b2061-b669-4b31-92ac-24d304d195dc,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;CS1PR84MB0309;20:qEDKQLBZeNcepK36pzey7+fLG8hq9DvEy1VeNKPp/CClOV3CKNZ+1HXIWKzpvq0BBzOLe5nTrrBV3m/rm+rc9oocZyvEi3w4AGuxbCN0i7ZIiz95uBwo6it1HI7jq4JBuLSxnpU6FrLiORfii62cIUnxny4DCmYEFooTTy66KsJRKmtXf3fkzs7BKKOHVigF5Y6N+dbz0mjClbqI0mpvsS011tQOuXp5wlBZagaMKioxOhgR+NDFMU4j0QSmbRm882VvO01lgp5oFmuXZoSvrVaCeHPTS+aUik4PdgV8o44uy9MBwDrgk281hxj7dHZ9vhVG9PX9R4Te37IYyKNqiQ==;4:XjTzocqvs2g8GTTjholQO0vXxnUZfchxf24n0IwDpYF3wjuH5/Gk5G9qTp66xzNIEbwfyZDgo9iD2ZVJ6HBXStxmn8P4bHoLzHSTp0hudkWqstTVZTSTDPKejmkuxSONeh7CZBRC63ADzE0K+C6nf31lnwrtdbUlUthf9fTtjEW8fbL4Y6ynzZwqbn3Kv6O3Q+R/jsGgPS0+V8sHWYruP4ldjuQdBHWOB4brtuzGGLuUd22wO/qjo6ybnsi5CwkS3SqgKW5wHDiYvnN9cUszHO66BPBCNOwGUZNH0G7L9x3awDyCRbY+boZYf+0+03nIb2F10p0NI6E8PpN2okSLTchyZShpSoEswUxiQUgMW6RJXojiIf+6pJxymMqhuoaU+jyHEvHSZbXC5qWx+vkjsA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026);SRVR:CS1PR84MB0309;BCL:0;PCL:0;RULEID:;SRVR:CS1PR84MB0309; X-Forefront-PRVS: 0906E83A25 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(24454002)(377454003)(80316001)(19580405001)(19580395003)(99136001)(87266999)(65816999)(54356999)(42186005)(5004730100002)(2950100001)(4326007)(50986999)(117156001)(76176999)(4001350100001)(47776003)(65806001)(65956001)(66066001)(23676002)(110136002)(36756003)(1096002)(92566002)(77096005)(189998001)(50466002)(81166005)(5008740100001)(93886004)(230700001)(86362001)(3846002)(33656002)(64126003)(6116002)(586003)(2906002);DIR:OUT;SFP:1102;SCL:1;SRVR:CS1PR84MB0309;H:[192.168.142.153];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDUzFQUjg0TUIwMzA5OzIzOkd0Vnd1YXNCL2lOem9BN0tJNHNLQkRoYk4w?= =?utf-8?B?Rk4yYW9KWjB0L2ZCZ3hqTm9kMTdaWmI1enRoNTB1bUNMaGxJUFRzSXIxVVc0?= =?utf-8?B?RXE5L2IyaWN0RTRsVTlTRThHNklMVERKZGdIa244eXhzT21UYUN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WRQZ0VMcHk4YS93WlZnVUxiRXpvQWJhREI4enJVZDhi?= =?utf-8?B?ZHlmVXpxL1dJNmtnbzJVN2hBMzN0OExKTENwdGFBZTY5S1dnWktvWHZoRk5Q?= =?utf-8?B?eXBiT0NzOG9MSGJrb24yZGZPbEJuVkZDY2FuYWlPTVBna0ZGcW9mZmg3b1Yx?= =?utf-8?B?SGNVU3pHVnBDcTBmWlV5dDViY2JwREdQNTg3V3pOSU12U0hWMVVsbEx6TGpv?= =?utf-8?B?ZUNDY3hEZmNHeHpBazM3dEtNempUc29yL0dMSkRaOE5lMFNiREtESVl1aVJm?= =?utf-8?B?OGd0blF1MlZ6WHZMUllIMFVaRjhzeUlsZU5YQndUN2lQZ3FwRzhhVjJURHNW?= =?utf-8?B?ZDh1NHlNbDVZSGpwamFidnlQeExvYzhobEU5ckw4RTQ1QlhuKzMyQXlsWjMv?= =?utf-8?B?V3UwaTlqdXBPNnlUeGpxeklTOWpMbnUyVGRBY2xSajNSWGF3dGFIZ3lsSWtT?= =?utf-8?Q?eMOZrpw8YDPKrzSPypY0tvzm0=3D?= X-Microsoft-Exchange-Diagnostics: 1;CS1PR84MB0309;5:FLmxpYfieDCIOHkGFlfOJ3RuwXnNGGQoqYnH+PEEYNQ7WaKS4BBLYiVLDrArzvidGgTgjlZFcNJFtxV+77+N7WP5+gtAxVq7dWrpaTbN3oRjbJNUlyx1yqvG6az9w5JleJwJsBr/SEEG5dlxHdXx6A==;24:4hjcECkzqVUkpJjHV+91XhgT5bfuDVrMPkPymOfi3R0+ierWExKN4EkzDG2gs4iAUf6RIpdQVYEMtKAdPp8fNSxg/Mj08nnmDDUQDQ3tJbs= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2016 20:08:03.9271 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0309 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1101 Lines: 26 On 04/07/2016 08:13 PM, Andy Lutomirski wrote: > On Thu, Apr 7, 2016 at 8:07 AM, Waiman Long wrote: >> On 04/07/2016 12:58 AM, Andy Lutomirski wrote: >>> Reading the HPET is so slow that all the atomic ops in the world won't >>> make a dent. Why not just turn this optimization on unconditionally? >>> >>> --Andy >> >> I am constantly on the alert that we should not introduce regression on >> lesser systems like a single socket machine with a few cores. That is why I >> put the check to conditionally enable this optimization. I have no issue of >> taking that out and let it be the default as long as no one object. >> > Agreed. I just suspect it's actually faster on all systems. > > This reminds me -- I need to send out my patch to disable the vdso > HPET code, which will make your change more effective. I'll cc you. > I am going to send an updated patch which reduces CPU threshold to 32 as well as adding kernel parameter to explicitly enable or disable this optimization. In this way, you can enable it on system with less CPUs, if necessary. Cheers, Longman