Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1326878imu; Wed, 16 Jan 2019 17:18:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Sfc5NCX1gdbNO2zIG1clQF6aCzCbtrmInionPNtexI3Gh5Zb2bbO3Sg5MKDL4iRxnsgfy X-Received: by 2002:a62:178f:: with SMTP id 137mr12712953pfx.226.1547687925919; Wed, 16 Jan 2019 17:18:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547687925; cv=none; d=google.com; s=arc-20160816; b=gu9H8Ihma99G6O6s7+JAPiJ0ihEUXreHY7/rRy+8ovq4ybtTYQo9FkqBTPmiZ+34B2 HRbAHqfnpPl9TFq7wwOop0/Rw7+Q95n68RcZb3arGXOkvv4ej3jErJIiI9dcouaAUDgo 0V8CG/lBjm/tv4C2xHRTIqLmvucom+ZQ81M2L7ji3lsquTZ8a8HLB0eHEI2Rvf5bXiT0 MxXeTYy69YQi6VLAgwhWJIL5BaosJV/19gEc8BHdJ+FZN/EsjQpucwHwVCaJy7/tDbSw nuRvwslc82CvyyKCBDm+wmTLLtuOONiVwogE9y4j5K7Kqv+Fqu+1du67Vc6yHJM8Tac2 J6GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=V+8dJcUg9SsrzJCzQ6Sot65yqPn4sSuG8kzCtdNByQ8=; b=LLnhom0lLdixwjWaaAGtmeZkQXcNbADeU7I7sogTkQNiCiPcxEHVOtLx4B862tECFO nhCYcY9czFA2sSkLftOXn2++yCB4nnNrleUtIR/zfvN66THqg9SFgdPKl9HIVByOj959 /ibN1BSe7sqg3JsDT+gEql+nnQguAkbmI4RPqdwb/yhn0v37FufIbA7J+Eijv4hc2xMC Gdo8Z/TRju0CjavIL3/cU9vyxn1eMcaljt4iR39V7OBA57dZwyyfZgYuQa7pPizJcaPx 4DG3O+35cj1Vdr43qHB+WvKxwDj0+lRU9jzh3McidWC9rBZs8cs5fcJCtc/BaNvJou6s MfiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HoBFURni; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q127si63129pfq.19.2019.01.16.17.18.30; Wed, 16 Jan 2019 17:18:45 -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; dkim=pass header.i=@kernel.org header.s=default header.b=HoBFURni; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbfAPXva (ORCPT + 99 others); Wed, 16 Jan 2019 18:51:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:40686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbfAPXva (ORCPT ); Wed, 16 Jan 2019 18:51:30 -0500 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 514A12087E for ; Wed, 16 Jan 2019 23:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547682689; bh=V+8dJcUg9SsrzJCzQ6Sot65yqPn4sSuG8kzCtdNByQ8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HoBFURniO7u7r45mANBzYRgPRdSP9atLsUyy45Wx4enTRhnziQKWQD6b/0gmJgX1m /USs5jXlzYok9t3qJXblV2yXnNjAZq4monOy+HTwDATJow4Rvb0OKTMJl3s5Q1draW Wxr5DJof4AJQ/c+IXZPs1LpM/SGYAx+5tPdyWNiE= Received: by mail-wr1-f45.google.com with SMTP id p4so8975829wrt.7 for ; Wed, 16 Jan 2019 15:51:29 -0800 (PST) X-Gm-Message-State: AJcUukcjFEkMT/2MzgjGx0dqNaNmcdxxTGU3mI8GKxVWbAoednbA2aam jSbIWTb9oGSjU77IoRNYdvmK/7VY6+uvhV59MxkvNw== X-Received: by 2002:a5d:550f:: with SMTP id b15mr9908316wrv.330.1547682687706; Wed, 16 Jan 2019 15:51:27 -0800 (PST) MIME-Version: 1.0 References: <1547673522-226408-1-git-send-email-fenghua.yu@intel.com> <1547673522-226408-3-git-send-email-fenghua.yu@intel.com> In-Reply-To: <1547673522-226408-3-git-send-email-fenghua.yu@intel.com> From: Andy Lutomirski Date: Wed, 16 Jan 2019 15:51:16 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/3] x86/umwait: Setup umwait C0.2 state To: Fenghua Yu Cc: Thomas Gleixner , Borislav Petkov , Ingo Molnar , H Peter Anvin , Andrew Cooper , Ashok Raj , Ravi V Shankar , linux-kernel , x86 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 16, 2019 at 1:24 PM Fenghua Yu wrote: > > UMWAIT or TPAUSE called by user process makes processor to reside in > a light-weight power/performance optimized state (C0.1 state) or an > improved power/performance optimized state (C0.2 state). > > IA32_UMWAIT_CONTROL MSR register allows OS to set global maximum umwait > time and disable C0.2 on the processor. > > By default C0.2 is enabled so user wait instructions can enter the state > if user wants to save more power but wakeup time is slower. In some cases > e.g. real time, user wants to disable C0.2 and all C0.2 requests revert > to C0.1. > > A new "/sys/devices/system/cpu/umwait_control/umwait_enable_c0_2" file is > created to allow user to check if C0.2 is enabled or disabled and also > allow user to enable or disable C0.2. Value "0" in the file means C0.2 is > disabled. Value "1" means C0.2 is enabled. Do you have any sense as to what the actual C0.2 entry and exit latency is? --Andy