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 3913BA034E; Tue, 22 Feb 2022 06:50:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2B8F40DF4; Tue, 22 Feb 2022 06:50:49 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 9FCD94068C for ; Tue, 22 Feb 2022 06:50:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645509049; x=1677045049; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9Y/X1xRms9dMFCFjxgvfvEd3emuFDmEcz4pYKBaXVG4=; b=hebGPHq0Baj6tXbpxH5iGmXgRLC6S+yu8dH+5GCDbYXNHHkVh/8cO2xg LJquyMcmt/Q5hlmJjLVhMic33sEY8qFSO45jcke0duahi8PccirGCF50w 6gLHsmkKbxi6thYqX+q9M+p0PZTHx2VdvkLFp02csAjauETA2X61K0sTz rc3rk58kLyY/pu4hhvUI/g9tpMMWJgitfmYagnCEMVDyLANbq9hiZo2ak 4IUbnOR+N1515gZYhRLD492EVwl/M0y2ACzAGPKdU9QKQJ94wgYMfu4XH JPM2rSPJNTVF0T/CYj8LgrUn7t0ba2P85kuD8IR7fhsRsqyerAWObFYi2 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10265"; a="235158317" X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="235158317" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2022 21:50:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,387,1635231600"; d="scan'208";a="547592156" Received: from limiao-icelake.sh.intel.com (HELO dpdk-limiao-01.sh.intel.com) ([10.67.115.126]) by orsmga008.jf.intel.com with ESMTP; 21 Feb 2022 21:50:46 -0800 From: Miao Li To: dev@dpdk.org Cc: david.hunt@intel.com, yinan.wang@intel.com, miao.li@intel.com Subject: [PATCH v1] power: add wakeup log Date: Tue, 22 Feb 2022 13:52:27 +0000 Message-Id: <20220222135227.631275-1-miao.li@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch adds a log in rte_power_monitor to show the core has been waked up. Signed-off-by: Miao Li --- 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