Skip to contentSkip to conversation

eal: add umonitor umwait to x86 cpuflags

PATCH In review Timothy McDaniel 2 participants 4 messages Sep 11, 2020 – Oct 9, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eal: add umonitor umwait to x86 cpuflags

umonitor/umwait are user-level versions of the monitor/mwait instructions. These allow the core to wait in a low-power state until a specified cache line is accessed, a timeout occurs, or the core is interrupted.

---
 lib/librte_eal/x86/include/rte_cpuflags.h | 1 +
 lib/librte_eal/x86/rte_cpuflags.c         | 1 +
 2 files changed, 2 insertions(+)
lib/librte_eal/x86/include/rte_cpuflags.h +1 -0
index c1d2036..ab2c3b3 100644
@@ -130,6 +130,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
 	RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
 	RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
+	RTE_CPUFLAG_UMWAIT,                 /**< UMONITOR/UMWAIT */
 	RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register Intersection */
 
 	/* The last item */
lib/librte_eal/x86/rte_cpuflags.c +1 -0
index 30439e7..6bed3eb 100644
@@ -137,6 +137,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
 	FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
 	FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
+	FEAT_DEF(UMWAIT, 0x00000007, 0, RTE_REG_ECX, 5)
 	FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
 };
 
Signature · 1 line
2.6.4
#1 lore raw
Quoted 6 lines

umonitor/umwait are user-level versions of the monitor/mwait instructions. These allow the core to wait in a low-power state until a specified cache line is accessed, a timeout occurs, or the core is interrupted.

Isn't it a duplicate to:
https://patches.dpdk.org/patch/76554/
?

Quoted 33 lines
---
 lib/librte_eal/x86/include/rte_cpuflags.h | 1 +
 lib/librte_eal/x86/rte_cpuflags.c         | 1 +
 2 files changed, 2 insertions(+)
lib/librte_eal/x86/include/rte_cpuflags.h +1 -0
index c1d2036..ab2c3b3 100644
@@ -130,6 +130,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
 	RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
 	RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B */
+	RTE_CPUFLAG_UMWAIT,                 /**< UMONITOR/UMWAIT */
 	RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register Intersection */
 
 	/* The last item */
lib/librte_eal/x86/rte_cpuflags.c +1 -1
index 30439e7..6bed3eb 100644
@@ -137,6 +137,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
 	FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
 	FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
+	FEAT_DEF(UMWAIT, 0x00000007, 0, RTE_REG_ECX, 5)
 	FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
 };
 
--

2.6.4

#2 lore raw
Quoted 15 lines

-----Original Message-----
From: Ananyev, Konstantin <[email protected]>
Sent: Friday, September 11, 2020 11:37 AM
To: McDaniel, Timothy <[email protected]>; Richardson, Bruce <[email protected]>
Cc: [email protected]; Carrillo, Erik G <[email protected]>; Eads, Gage <[email protected]>; Van Haaren, Harry <[email protected]>; Ma, Liang J <[email protected]>; Burakov, Anatoly <[email protected]>
Subject: RE: [PATCH] eal: add umonitor umwait to x86 cpuflags

Quoted 1 line
Quoted 8 lines
Quoted 4 lines

umonitor/umwait are user-level versions of the monitor/mwait instructions. These allow the core to wait in a low-power state until a specified cache line is accessed, a timeout occurs, or the core is interrupted.

Isn't it a duplicate to:
https://patches.dpdk.org/patch/76554/
?

Yes, the new rte_cpuflags.[ch] bit definitions for umonitor/umwait appear to be duplicates. I am not opposed to dropping my patch, so long as this new bit gets defined in some other patch that makes it into 20.11.

Quoted 37 lines

Review

Quoted 9 lines
---
 lib/librte_eal/x86/include/rte_cpuflags.h | 1 +
 lib/librte_eal/x86/rte_cpuflags.c         | 1 +
 2 files changed, 2 insertions(+)
(quoted diff) +0 -0

b/lib/librte_eal/x86/include/rte_cpuflags.h

lib/librte_eal/x86/include/rte_cpuflags.h enum rte_cpu_flag_t { · line 132

Quoted 7 lines

index c1d2036..ab2c3b3 100644

lib/librte_eal/x86/include/rte_cpuflags.h +0 -0
@@ -130,6 +130,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
 	RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
 	RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B

*/

lib/librte_eal/x86/include/rte_cpuflags.h enum rte_cpu_flag_t { · line 134

Quoted 2 lines
lib/librte_eal/x86/include/rte_cpuflags.h +1 -0
+	RTE_CPUFLAG_UMWAIT,                 /**< UMONITOR/UMWAIT */
 	RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register

Intersection */

Quoted 16 lines
lib/librte_eal/x86/include/rte_cpuflags.h +0 -0
 	/* The last item */
lib/librte_eal/x86/rte_cpuflags.c +1 -1
index 30439e7..6bed3eb 100644
@@ -137,6 +137,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
 	FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
 	FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
+	FEAT_DEF(UMWAIT, 0x00000007, 0, RTE_REG_ECX, 5)
 	FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
 };
 
--

2.6.4

#3 lore raw
In reply to Ananyev, Konstantin
Quoted 58 lines

-----Original Message-----
From: Ananyev, Konstantin <[email protected]>
Sent: Friday, September 11, 2020 11:37 AM
To: McDaniel, Timothy <[email protected]>; Richardson, Bruce <[email protected]>
Cc: [email protected]; Carrillo, Erik G <[email protected]>; Eads, Gage <[email protected]>; Van Haaren, Harry <[email protected]>; Ma, Liang J <[email protected]>; Burakov, Anatoly <[email protected]>
Subject: RE: [PATCH] eal: add umonitor umwait to x86 cpuflags

Quoted 5 lines

umonitor/umwait are user-level versions of the monitor/mwait instructions. These allow the core to wait in a low-power state until a specified cache line is accessed, a timeout occurs, or the core is interrupted.

Isn't it a duplicate to:
https://patches.dpdk.org/patch/76554/
?

Review

Quoted 8 lines
---
 lib/librte_eal/x86/include/rte_cpuflags.h | 1 +
 lib/librte_eal/x86/rte_cpuflags.c         | 1 +
 2 files changed, 2 insertions(+)
(quoted diff) +0 -0

b/lib/librte_eal/x86/include/rte_cpuflags.h

lib/librte_eal/x86/include/rte_cpuflags.h enum rte_cpu_flag_t { · line 132

Quoted 7 lines

index c1d2036..ab2c3b3 100644

lib/librte_eal/x86/include/rte_cpuflags.h +0 -0
@@ -130,6 +130,7 @@ enum rte_cpu_flag_t {
 	RTE_CPUFLAG_CLDEMOTE,               /**< Cache Line Demote */
 	RTE_CPUFLAG_MOVDIRI,                /**< Direct Store Instructions */
 	RTE_CPUFLAG_MOVDIR64B,              /**< Direct Store Instructions 64B

*/

lib/librte_eal/x86/include/rte_cpuflags.h enum rte_cpu_flag_t { · line 134

Quoted 2 lines
lib/librte_eal/x86/include/rte_cpuflags.h +1 -0
+	RTE_CPUFLAG_UMWAIT,                 /**< UMONITOR/UMWAIT */
 	RTE_CPUFLAG_AVX512VP2INTERSECT,     /**< AVX512 Two Register

Intersection */

Quoted 14 lines
lib/librte_eal/x86/include/rte_cpuflags.h +0 -0
 	/* The last item */
lib/librte_eal/x86/rte_cpuflags.c +1 -0
index 30439e7..6bed3eb 100644
@@ -137,6 +137,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(CLDEMOTE, 0x00000007, 0, RTE_REG_ECX, 25)
 	FEAT_DEF(MOVDIRI, 0x00000007, 0, RTE_REG_ECX, 27)
 	FEAT_DEF(MOVDIR64B, 0x00000007, 0, RTE_REG_ECX, 28)
+	FEAT_DEF(UMWAIT, 0x00000007, 0, RTE_REG_ECX, 5)
 	FEAT_DEF(AVX512VP2INTERSECT, 0x00000007, 0, RTE_REG_EDX, 8)
 };
 
Quoted 2 lines
Quoted 2 lines

--
2.6.4

With regards to the dependency on part of the power patch set (first patch in the WAITPKG patch series http://patches.dpdk.org/project/dpdk/list/?series=12669 ), we understand the power team are addressing any outstanding issues today. This should allow the DLB (https://patches.dpdk.org/project/dpdk/list/?series=12163) and DLB2 (https://patches.dpdk.org/project/dpdk/list/?series=12164) patch sets to make use of the CPU ID patch as planned. Let us know if there is anything else outstanding. We are currently working towards the PMD merge deadline date.

Thanks, Tim