From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F36241D91 for ; Mon, 27 Feb 2023 14:52:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 823EE40A84; Mon, 27 Feb 2023 14:52:50 +0100 (CET) Received: from CNSHPPMGWESA02.NOKIA-SBELL.COM (cnshjsmin05.app.nokia-sbell.com [116.246.26.45]) by mails.dpdk.org (Postfix) with ESMTP id 0AB6740A7D for ; Mon, 27 Feb 2023 14:52:48 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.98,332,1673884800"; d="scan'208,217";a="11226185" Received: from unknown (HELO CNSHPPEXCH1605.nsn-intra.net) ([135.251.51.105]) by CNSHPPMGWESA02.NOKIA-SBELL.COM with ESMTP; 27 Feb 2023 21:52:46 +0800 Received: from CNSHPPEXCH1601.nsn-intra.net (135.251.51.101) by CNSHPPEXCH1605.nsn-intra.net (135.251.51.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 27 Feb 2023 21:52:46 +0800 Received: from CNSHPPEXCH1601.nsn-intra.net ([135.251.51.101]) by CNSHPPEXCH1601.nsn-intra.net ([135.251.51.101]) with mapi id 15.01.2375.034; Mon, 27 Feb 2023 21:52:46 +0800 From: "Xiaoping Yan (NSB)" To: "users@dpdk.org" Subject: rte_power_monitor_multi can not enter C0.2/C0.1 state (RTM transaction abort with 0) Thread-Topic: rte_power_monitor_multi can not enter C0.2/C0.1 state (RTM transaction abort with 0) Thread-Index: AdlKscJQKoLuo5G3Q7KX2WFZlCzG3g== Date: Mon, 27 Feb 2023 13:52:46 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [135.251.51.115] Content-Type: multipart/alternative; boundary="_000_cf62d874ecc1443ca76095f12345c132nokiasbellcom_" MIME-Version: 1.0 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --_000_cf62d874ecc1443ca76095f12345c132nokiasbellcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I'm trying power saving feature in my server with intel sapphire rapid CPU.= With "tsx=3Don" kernel parameter, I have both rtm and waitpkg available in= CPU flag. I tried rte_power_monitor_multi API to monitor on multiple address, but it = never enters C0.2/C0.1 state. To find the reason I patched the code to return the transaction abort code = as below: /* transaction abort, possible write to one of wait addresses */ if (rc !=3D RTE_XBEGIN_STARTED) - return 0; + return rc; and it turn out that RTM transaction always aborted with 0 (a few times wit= h 4 or 6 also, which I think maybe expected due to memory change of monitor= ed addresses). I found some explanation of the abort state here: https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-= developer-guide-and-reference/top/compiler-reference/intrinsics/intrinsics-= for-avx2/intrinsics-for-tsx/intrinsics-for-restrict-transactional-mem-ops/r= estricted-transactional-memory-overview.html For abort code 0, it just say one example (CPUID used within transcation), = but it seems CPUID is not used within rte_power_monitor_multi. I also tried rte_power_pause and rte_power_monitor, both works as expected,= CPU enters C0.2 state (checked by perf stat --e r20ec -C xx) Now, I don't know why the RTM transaction aborted with 0 and don't know how= to debug it. Can anyone throw some light on this? Thank you. Br, Xiaoping --_000_cf62d874ecc1443ca76095f12345c132nokiasbellcom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I’m trying power saving f= eature in my server with intel sapphire rapid CPU. With “tsx=3DonR= 21; kernel parameter, I have both rtm and waitpkg available in CPU flag.

I tried rte_power_monitor_multi= API to monitor on multiple address, but it never enters C0.2/C0.1 state.

To find the reason I patched th= e code to return the transaction abort code as below:

        /* tran= saction abort, possible write to one of wait addresses */=

        if (rc = !=3D RTE_XBEGIN_STARTED)

-        &= nbsp;      return 0;

+       &nb= sp;       return rc;

and it turn out that RTM transa= ction always aborted with 0 (a few times with 4 or 6 also, which I think ma= ybe expected due to memory change of monitored addresses).

I found some explanation of the= abort state here:

https://www.intel.com/content/www/us/en/develop/d= ocumentation/cpp-compiler-developer-guide-and-reference/top/compiler-refere= nce/intrinsics/intrinsics-for-avx2/intrinsics-for-tsx/intrinsics-for-restri= ct-transactional-mem-ops/restricted-transactional-memory-overview.html<= o:p>

For abort code 0, it just say o= ne example (CPUID used within transcation), but it seems CPUID is not used = within rte_power_monitor_multi.

I also tried rte_power_pause an= d rte_power_monitor, both works as expected, CPU enters C0.2 state (checked= by perf stat --e r20ec -C xx)

 

Now, I don’t know why the= RTM transaction aborted with 0 and don’t know how to debug it.<= /o:p>

 

Can anyone throw some light on = this?

 

Thank you.

 

Br, Xiaoping<= /p>

 

--_000_cf62d874ecc1443ca76095f12345c132nokiasbellcom_--