DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] power: add wakeup log
@ 2022-02-22 13:52 Miao Li
  2022-02-22 16:07 ` Stephen Hemminger
  2022-02-22 16:32 ` David Hunt
  0 siblings, 2 replies; 6+ messages in thread
From: Miao Li @ 2022-02-22 13:52 UTC (permalink / raw)
  To: dev; +Cc: david.hunt, yinan.wang, miao.li

This patch adds a log in rte_power_monitor to show the core has been
waked up.

Signed-off-by: Miao Li <miao.li@intel.com>
---
 lib/eal/x86/rte_power_intrinsics.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/eal/x86/rte_power_intrinsics.c b/lib/eal/x86/rte_power_intrinsics.c
index f749da9b85..dd63e2b6eb 100644
--- a/lib/eal/x86/rte_power_intrinsics.c
+++ b/lib/eal/x86/rte_power_intrinsics.c
@@ -128,6 +128,14 @@ rte_power_monitor(const struct rte_power_monitor_cond *pmc,
 			: "D"(0), /* enter C0.2 */
 			  "a"(tsc_l), "d"(tsc_h));
 
+	cur_value = __get_umwait_val(pmc->addr, pmc->size);
+
+	/* check if core has been waked up by changing monitoring value */
+	if (pmc->fn(cur_value, pmc->opaque) != 0)
+		RTE_LOG(INFO, EAL,
+			"lcore %u is waked up from value change\n",
+			rte_lcore_id());
+
 end:
 	/* erase sleep address */
 	rte_spinlock_lock(&s->lock);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-25 11:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 13:52 [PATCH v1] power: add wakeup log Miao Li
2022-02-22 16:07 ` Stephen Hemminger
2022-02-24  2:45   ` Li, Miao
2022-02-22 16:32 ` David Hunt
2022-02-24  2:38   ` Li, Miao
2022-02-25 11:19     ` Burakov, Anatoly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).