Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp984424img; Tue, 26 Feb 2019 12:01:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IZuMDEj+M72P9TQjFD/0hLLFkpN4+yWpGibPfilFHPwuNTZ3Dua2sVccHe6aXKSeehRep80 X-Received: by 2002:a65:6383:: with SMTP id h3mr25603747pgv.11.1551211278804; Tue, 26 Feb 2019 12:01:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551211278; cv=none; d=google.com; s=arc-20160816; b=BbRjHXhOvkUHzJ7uelosoBm4H5WePmoUhJ4k0V24fUYbRULodjK1Cu69+RvRRVmP62 P7Shm/2BJLeFo71FwH4Mvz26XnYMilmTZq6IWA6isyZW8Dn2Jee3iicrWjh2IlfdKUKA TBu+CykhWQcD3Ew+kIEB/u1Tyx0ep7FrVeTn23ZMr614AGVDwB+wgN0B7yHvFg4U9tuC uMMpjWb/SYhe6CYbIBHexfriuW93Mko8AdXJhp3ThnyR9ExZVHpM8H4YyLsHKLwhAoUp /YgU4tTxiIe4x1WsONca2zCDGS5pYzsaqgXg/D23LvJyUGvGui0WFT3as9qCcx3BjfMc Vc2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=hiHswLtFMN5C4IJI95CvvPbh+PR08ePSkPbng2n5Kf8=; b=HwSbIGBjyqC09P3spwZVjhFv4VpULKMtIQBXFkRehTOXip+T51pBd4u9ueqQGiX4Mi qRK4iEauGmLaNbY4ARkbmLLYnBqLl4xxEXiordQUlg02IDtmyuRErKSvuo1KSbRjnAzW fW73c8/vJPYg+k0vy+vfIxl8u2HkursJ0wbSjmQYkr8jAnxnLbhOppccfBmuOl7kHxEY CfakHaPZyuxsm2Suqtu+kGhXjBfnl9mPdAdMMKQQq+1NyafePJHiWGr+ktlNzQFCvWw8 OKA7st4AHWoyCnfAQb2E4yxvK+DeeOe8JN4EXK7+anfeD31R1a8OpKPqZ7uOga135XH/ IkyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si3372232pgp.169.2019.02.26.12.00.50; Tue, 26 Feb 2019 12:01:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728849AbfBZUAR (ORCPT + 99 others); Tue, 26 Feb 2019 15:00:17 -0500 Received: from mga12.intel.com ([192.55.52.136]:41542 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728341AbfBZUAR (ORCPT ); Tue, 26 Feb 2019 15:00:17 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2019 12:00:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,416,1544515200"; d="scan'208";a="323605617" Received: from romley-ivt3.sc.intel.com ([172.25.110.60]) by fmsmga005.fm.intel.com with ESMTP; 26 Feb 2019 12:00:14 -0800 Date: Tue, 26 Feb 2019 11:53:27 -0800 From: Fenghua Yu To: Andy Lutomirski Cc: "Xu, Tao3" , "Liu, Jingqi" , Thomas Gleixner , Borislav Petkov , Ingo Molnar , H Peter Anvin , Andrew Cooper , "Raj, Ashok" , "Shankar, Ravi V" , linux-kernel , x86 Subject: Re: [PATCH v2 1/3] x86/cpufeatures: Enumerate user wait instructions Message-ID: <20190226195327.GA192131@romley-ivt3.sc.intel.com> References: <1547673522-226408-1-git-send-email-fenghua.yu@intel.com> <1547673522-226408-6-git-send-email-fenghua.yu@intel.com> <20190221192424.GA158428@romley-ivt3.sc.intel.com> <3E5A0FA7E9CA944F9D5414FEC6C712209D877F3A@ORSMSX106.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 24, 2019 at 11:45:35AM -0800, Andy Lutomirski wrote: > On Thu, Feb 21, 2019 at 2:57 PM Yu, Fenghua wrote: > > > > > From: Fenghua Yu [mailto:fenghua.yu@intel.com] > > > On Wed, Feb 20, 2019 at 10:37:27PM -0800, Andy Lutomirski wrote: > > > Or to simplify the situation, how about we still use zero as global max wait > > > time (i.e. no limitation for global wait time) as implemented in this patch > > > set? User can still change the value to any value based on their usage. Isn't > > > this a right way to take care of any usage? > > > > Plus, if scheduler timers works, umwait will be forced time out by timer in HZ anyway. > > Indeed. But, on some configs, the scheduler timer intentionally will > *not* fire. > > > > > Only for case without scheduler timer, sysadmin may need to set a small max umwait time to force timout. But in this case (real time), I doubt user app really wants to call umwait to save power with long latency of waking up from umwait. So likely in this case, user app won't call umwait and there is no usage to set a small value for max umwait time. > > I don't really know why an application would use umwait at all. About > the only legitimate use I can think of is to treat it as a somewhat > power-saving variant of REP NOP. What I want to avoid is the case > where it works dramatically differently on NO_HZ_FULL systems as > compared to everything else. Also, UMWAIT may behave a bit > differently if the max timeout is hit, and I'd like that path to get > exercised widely by making it happen even on default configs. > > So I propose setting the timeout to either 100 microseconds or 100k > "cycles" by default. In the event someone determines that they save > materially more power or gets materially better performance with a > longer timeout, we can revisit the value. OK. I will set the default umwait max time value to 100K cycles. Thanks. -Fenghua