From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 4EEE3A04B0;
	Thu, 13 Aug 2020 20:04:48 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id B04E01C0BD;
	Thu, 13 Aug 2020 20:04:46 +0200 (CEST)
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id ED9134CBD
 for <dev@dpdk.org>; Thu, 13 Aug 2020 20:04:44 +0200 (CEST)
IronPort-SDR: YuNkrG5nr/F3cs6+HYyP0uywrupjiqOqzp3Xf2cQZ5RZjbLOg7X2j6dW/Q1nF81DWptBPmahmO
 cD6SI/T72p2g==
X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="153522317"
X-IronPort-AV: E=Sophos;i="5.76,309,1592895600"; d="scan'208";a="153522317"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga008.jf.intel.com ([10.7.209.65])
 by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 13 Aug 2020 11:04:43 -0700
IronPort-SDR: rnlj2aLBS8ClfftZtvBslRbGLCPOehYZe7UXxo3ebEMloBt9/m9Prk5QsjkbK81z4tCpmQtsiy
 tIm3/ckjifzw==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.76,309,1592895600"; d="scan'208";a="325495921"
Received: from irvmail001.ir.intel.com ([163.33.26.43])
 by orsmga008.jf.intel.com with ESMTP; 13 Aug 2020 11:04:42 -0700
Received: from sivswdev09.ir.intel.com (sivswdev09.ir.intel.com
 [10.237.217.48])
 by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id
 07DI4gJL014994; Thu, 13 Aug 2020 19:04:42 +0100
Received: from sivswdev09.ir.intel.com (localhost [127.0.0.1])
 by sivswdev09.ir.intel.com with ESMTP id 07DI4gam006141;
 Thu, 13 Aug 2020 19:04:42 +0100
Received: (from lma25@localhost)
 by sivswdev09.ir.intel.com with LOCAL id 07DI4gKb006136;
 Thu, 13 Aug 2020 19:04:42 +0100
Date: Thu, 13 Aug 2020 19:04:41 +0100
From: "Liang, Ma" <liang.j.ma@intel.com>
To: dev@dpdk.org
Cc: anatoly.burakov@intel.com
Message-ID: <20200813180441.GA28651@sivswdev09.ir.intel.com>
References: <cover.1590598121.git.anatoly.burakov@intel.com>
 <1597141666-20621-1-git-send-email-liang.j.ma@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1597141666-20621-1-git-send-email-liang.j.ma@intel.com>
Subject: Re: [dpdk-dev] [RFC v2 1/5] eal: add power management intrinsics
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On 11 Aug 11:27, Liang Ma wrote:
> Add two new power management intrinsics, and provide an implementation
> in eal/x86 based on UMONITOR/UMWAIT instructions. The instructions
> are implemented as raw byte opcodes because there is not yet widespread
> compiler support for these instructions.
> 
> The power management instructions provide an architecture-specific
> function to either wait until a specified TSC timestamp is reached, or
> optionally wait until either a TSC timestamp is reached or a memory
> location is written to. The monitor function also provides an optional
> comparison, to avoid sleeping when the expected write has already
> happened, and no more writes are expected.
> 
> Signed-off-by: Liang Ma <liang.j.ma@intel.com>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> --- 
<snip> 
> diff --git a/lib/librte_eal/x86/include/rte_cpuflags.h b/lib/librte_eal/x86/include/rte_cpuflags.h
> index c1d20364d..94d6a4376 100644
> --- a/lib/librte_eal/x86/include/rte_cpuflags.h
> +++ b/lib/librte_eal/x86/include/rte_cpuflags.h
> @@ -110,6 +110,7 @@ enum rte_cpu_flag_t {
>  	RTE_CPUFLAG_RDTSCP,                 /**< RDTSCP */
>  	RTE_CPUFLAG_EM64T,                  /**< EM64T */
>  
> +	RTE_CPUFLAG_WAITPKG,                 /**< UMINITOR/UMWAIT/TPAUSE */
need re-work the order to avoid breaking ABI
>  	/* (EAX 80000007h) EDX features */
>  	RTE_CPUFLAG_INVTSC,                 /**< INVTSC */
>  
</snip>  
> -- 
> 2.17.1
>