DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Hunt <david.hunt@intel.com>
To: Miao Li <miao.li@intel.com>, <dev@dpdk.org>
Cc: <yinan.wang@intel.com>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: Re: [PATCH v1] power: add wakeup log
Date: Tue, 22 Feb 2022 16:32:23 +0000	[thread overview]
Message-ID: <075cf990-f0b8-8a8c-94c4-420f185e9e94@intel.com> (raw)
In-Reply-To: <20220222135227.631275-1-miao.li@intel.com>


On 22/2/2022 1:52 PM, Miao Li wrote:
> 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);


Hi Li,

If I'm not mistaken, a similar patch was added to a previous DPDK 
release and then removed because of the enormous performance impact.

This looks to be something similar, and it's adding a log message to a 
low-level function. Also, as mentioned before, the intention in the 
future is to call this function much more agressively, so there would be 
hundreds of thousands of messages every second.

We cannot add an RTE_LOG here. Please rework and put the log in the test 
case instead.

Also, regarding the wording, I would suggest  "lcore %u awoke due to 
monitor address value change\n"

Rgds,

Dave.



  parent reply	other threads:[~2022-02-22 16:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 13:52 Miao Li
2022-02-22 16:07 ` Stephen Hemminger
2022-02-24  2:45   ` Li, Miao
2022-02-22 16:32 ` David Hunt [this message]
2022-02-24  2:38   ` Li, Miao
2022-02-25 11:19     ` Burakov, Anatoly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=075cf990-f0b8-8a8c-94c4-420f185e9e94@intel.com \
    --to=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=miao.li@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=yinan.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).