Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4671951ybi; Tue, 11 Jun 2019 10:28:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMWG1fJUSvD7dBcV6GxtRZ+m+0nu6eWAcyDBiNhSF7PG+iXZJokoh8kUeuAldzC3RlFrz6 X-Received: by 2002:a17:902:a405:: with SMTP id p5mr6922504plq.51.1560274121369; Tue, 11 Jun 2019 10:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560274121; cv=none; d=google.com; s=arc-20160816; b=zaR/j8yvZJqPeUqUNu7257AGkFiJ9PJisU82cbxQ7k7H3Xswa6QM+4V7ioW6Lnm1A+ mcSjT3ZmWtlWOOobUnDBUIHa/9AtCfMAIAl3MwIIuf2dSSMyshtjbLwvY+XBGAiHUjai 3VaoioB80RqrzQxS4bDH15s2ob55ba+cNAFiSnlGpFSKwMSiwfHnHnBzyxwBL4XKkvOn mJ5o8RZESCBQ7YcqRJgoQfAbcmzBsOnQkxLMAjm5JOrwcum9D5gc4SDHdXqxg9s7xpIJ tFqcjzJ5i6koXBYR4F4oRB9rYGqIYgCbZuNL/WmCRmK2FnHJKuvicS+I9Yrm6rp42ZOf GBXQ== 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:dkim-signature; bh=Dar/WM9H13xu/Hyi4BKbNrb4KMNdAL61gb8NhO+H5E8=; b=sbF0xWC4jg4vmFuYL8ARoVD+Bwg432UJ3y8Z0WFzR8s2Q5EOhNCUdwvOOgCwV3horo KQztfpEIb9TXsDO7gzIuMDzCJp7IgoKcyD5E3NhlXNoxqlefYO28UJV5cId01JxjgHNC IOcra0LONOKqnCOa+2G3okjLVA7XbvdWGi+tDyQaks8nHEbFY9xaBpyJrUj4GpzdxfZF doiCGUi1W49M5i6nQck1A5112nHLL3YFiKWTH1+T/UwRxEMxv0i7x7Ubs9/5Tm+Pd0b7 Qjtaiz9Sn44XpIP3J7gyTUOetVSbYv0J/LVIvxvNxv4phtKVxf4/fGONsWeNV4qwjNY0 CDGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="QfHg/jEZ"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e25si12938177pgb.367.2019.06.11.10.28.26; Tue, 11 Jun 2019 10:28:41 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="QfHg/jEZ"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406091AbfFKR1b (ORCPT + 99 others); Tue, 11 Jun 2019 13:27:31 -0400 Received: from merlin.infradead.org ([205.233.59.134]:57638 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405718AbfFKR1b (ORCPT ); Tue, 11 Jun 2019 13:27:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Dar/WM9H13xu/Hyi4BKbNrb4KMNdAL61gb8NhO+H5E8=; b=QfHg/jEZCM3KPVt89hxZScmxp0 i5wupjPy58t3ZNKCLb8DxCIRmec0fEnUZiWZ3TXn/Nt5zVCDh3qYQblmdXCSnFXIObGe8aII0S7Lc oPkt8cCIumc7tFdvZtoK5IMBo9t3sV1zrFLEaqVIVj7yqiSXUL/mlVTmuZJA/UfG+naZVJ7AgLuph iVa2eDr0c+VqzDBYWOWA4xKXKIpHpuHXLrXy+WlGiFMUaQf8Ct0iuGwciShDGdYb8mwu4MEXN3xjz 6doexOaudPHV29i+WeAhg0xVSgw9bsFUrdrLOJ3pJI3pWs8VKVAnFLdamKRkoweBnOt52vTaru5cS NeVgQ4cQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hakYK-0006EZ-SR; Tue, 11 Jun 2019 17:27:21 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BEB712025A826; Tue, 11 Jun 2019 19:27:17 +0200 (CEST) Date: Tue, 11 Jun 2019 19:27:17 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Andy Lutomirski , 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: <20190611172717.GC3436@hirez.programming.kicks-ass.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0D67CEAC-9710-4ECB-9248-75B48542FF82@amacapital.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (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.