Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2846984ybi; Mon, 17 Jun 2019 11:21:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgL7Js/HTCNKGhdveILjbnzvoFulOJSl8SLksKz+jVpPPx7uWD2h3UhYkifpZS9ZPg0xsM X-Received: by 2002:a17:902:2ac1:: with SMTP id j59mr36282454plb.156.1560795700520; Mon, 17 Jun 2019 11:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560795700; cv=none; d=google.com; s=arc-20160816; b=reoM5afvsHArDMajBrFhd5W//gRhdztvifIhwI1hVLw8sk5HXCBhSUiQbi2IqRgtNH 2U1vFiDEo6oaYuzLe3gkq/zroHeqgUR8V73qrLnkF5nbzOeU5yQFKldGTVkVoru5YRXy fX5fyOOClGtllYPH0ciGS1ftlC+2WGlEIBvGku+F2yYG7z3mUn7epxHckVuPzQ4PVEf9 gbzL+D2+5qM0kmobUWjGtPthFCGt8UPbTHJCENGlHBqqda52ucX7AHoq3bi6lUfo1sM4 B8ZovcT4ac4HniDOmkuxKn/eV0a+o0t/bDJTRvg4ciP0YOh9T9EicGisp59A1A2fsJMo HDdA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=FcM2gw+krVBpQJ+SPw9DqR0rhhvMcgfC2i6rd3Er3to=; b=idENdqFtyQQuv4v2j4+LEhRBgn9GY1YV+ktMZROCo+/bNE7pDfOAWDLI6Q+z9xTzJi yeeP9+x7q6TTN0iduaGFrXPxEE1MIbaV7sKfTrRJalA4T9bTSlw9iFh8BY9qDF24jt8p O/NqX8pccX24blCGNIhQLntvO+OHEL5KEIt0Y4750DnVgDW27eKVK8XSjUUb5+E3EVY+ i2S4+iBhbZFr62SSzL/XuBd2ppnd3DrEmpwpJlGKP/6nFCeMmLC60yCTwO+fnDTp2HFA VxAPAi6FrHp53GZgutXvevp/KEVPjubtYYGtqdmBO6h0wnpjqc9bomW6WrdQIlnMmdF7 +RVQ== 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 m9si417332pgq.373.2019.06.17.11.21.24; Mon, 17 Jun 2019 11:21:40 -0700 (PDT) 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 S1726443AbfFQSVO (ORCPT + 99 others); Mon, 17 Jun 2019 14:21:14 -0400 Received: from mga03.intel.com ([134.134.136.65]:18866 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725764AbfFQSVO (ORCPT ); Mon, 17 Jun 2019 14:21:14 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 11:21:13 -0700 X-ExtLoop1: 1 Received: from romley-ivt3.sc.intel.com ([172.25.110.60]) by fmsmga004.fm.intel.com with ESMTP; 17 Jun 2019 11:21:13 -0700 Date: Mon, 17 Jun 2019 11:11:42 -0700 From: Fenghua Yu To: Andy Lutomirski Cc: Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Ashok Raj , Tony Luck , Ravi V Shankar , linux-kernel , x86 Subject: Re: [PATCH v4 3/5] x86/umwait: Add sysfs interface to control umwait C0.2 state Message-ID: <20190617181142.GA217081@romley-ivt3.sc.intel.com> References: <1559944837-149589-1-git-send-email-fenghua.yu@intel.com> <1559944837-149589-4-git-send-email-fenghua.yu@intel.com> <20190611085410.GT3436@hirez.programming.kicks-ass.net> <0D67CEAC-9710-4ECB-9248-75B48542FF82@amacapital.net> <20190611172717.GC3436@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Mon, Jun 17, 2019 at 08:14:44AM -0700, Andy Lutomirski wrote: > On Tue, Jun 11, 2019 at 10:27 AM Peter Zijlstra wrote: > > > > > > (can you, perchance, look at a MUA that isn't 'broken' ?) > > > > On Tue, Jun 11, 2019 at 09:04:30AM -0700, Andy Lutomirski wrote: > > > > > > > > > > On Jun 11, 2019, at 1:54 AM, Peter Zijlstra wrote: > > > > > > > >> On Fri, Jun 07, 2019 at 03:00:35PM -0700, Fenghua Yu wrote: > > > >> C0.2 state in umwait and tpause instructions can be enabled or disabled > > > >> on a processor through IA32_UMWAIT_CONTROL MSR register. > > > >> > > > >> By default, C0.2 is enabled and the user wait instructions result in > > > >> lower power consumption with slower wakeup time. > > > >> > > > >> But in real time systems which require faster wakeup time although power > > > >> savings could be smaller, the administrator needs to disable C0.2 and all > > > >> C0.2 requests from user applications revert to C0.1. > > > >> > > > >> A sysfs interface "/sys/devices/system/cpu/umwait_control/enable_c02" is > > > >> created to allow the administrator to control C0.2 state during run time. > > > > > > > > We already have an interface for applications to convey their latency > > > > requirements (pm-qos). We do not need another magic sys variable. > > > > > > I’m not sure I agree. This isn’t an overall latency request, and > > > setting an absurdly low pm_qos will badly hurt idle power and turbo > > > performance. Also, pm_qos isn’t exactly beautiful. > > > > > > (I speak from some experience. I may be literally the only person to > > > write a driver that listens to dev_pm_qos latency requests. And, in my > > > production box, I directly disable c states instead of messing with > > > pm_qos.) > > > > > > I do wonder whether anyone will ever use this particular control, though. > > > > I agree that pm-qos is pretty terrible; but that doesn't mean we should > > just add random control files all over the place. > > I don't think pm-qos is expressive enough. It seems entirely > reasonable to want to do a C0.1 wait for lower latency *while waiting* > but still want full power-saving idle when not waiting. > > Do we even know what the C0.2 and C0.1 latencies are? And why is this > thing an MSR instead of a flag passed to UMWAIT? I will still keep this sysfs interface in the next version of patches, right? Thanks. -Fenghua