patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Sivaprasad Tummala <sivaprasad.tummala@amd.com>,
	<david.hunt@intel.com>, <jerinj@marvell.com>,
	<radu.nicolau@intel.com>, <gakhil@marvell.com>,
	<cristian.dumitrescu@intel.com>, <ferruh.yigit@amd.com>,
	<konstantin.ananyev@huawei.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>
Subject: Re: [PATCH v2] eal/x86: enable timeout in AMD power monitor
Date: Tue, 14 Oct 2025 10:56:28 +0200	[thread overview]
Message-ID: <39c5c720-4c30-435b-ac28-96b2cd10afb3@intel.com> (raw)
In-Reply-To: <20251013055158.3037400-1-sivaprasad.tummala@amd.com>

On 10/13/2025 7:51 AM, Sivaprasad Tummala wrote:
> Previously, the AMD power monitor implementation did not enable the
> timeout, causing the lcore to remain in a wait state until an external
> monitoring event occurred or an interrupt was received.
> 
> This patch enables the timeout-based exit condition, allowing
> the lcore to automatically wake up after the specified period.
> The maximum supported timeout value is 2^32 - 1.
> 
> Fixes: c7ed1ce04704 ("eal/x86: add power intrinsics for AMD")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> 
> v2:
> 1. fixed asm compilation error.
> ---
>   lib/eal/x86/rte_power_intrinsics.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/eal/x86/rte_power_intrinsics.c b/lib/eal/x86/rte_power_intrinsics.c
> index 489ad3983f..8a5f222aea 100644
> --- a/lib/eal/x86/rte_power_intrinsics.c
> +++ b/lib/eal/x86/rte_power_intrinsics.c
> @@ -89,14 +89,14 @@ static void amd_monitorx(volatile void *addr)
>   
>   static void amd_mwaitx(const uint64_t timeout)
>   {
> -	RTE_SET_USED(timeout);
>   #if defined(RTE_TOOLCHAIN_MSVC) || defined(__MWAITX__)
> -	_mm_mwaitx(0, 0, 0);
> +	_mm_mwaitx(2, 0, (uint32_t)timeout);
>   #else
>   	asm volatile(".byte 0x0f, 0x01, 0xfb;"
>   			: /* ignore rflags */
>   			: "a"(0), /* enter C1 */
> -			"c"(0)); /* no time-out */
> +			"b"((uint32_t)timeout),
> +			"c"(2)); /* enable time-out */
>   #endif
>   }
>   

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

      reply	other threads:[~2025-10-14  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-13  3:16 [PATCH] " Sivaprasad Tummala
2025-10-13  5:51 ` [PATCH v2] " Sivaprasad Tummala
2025-10-14  8:56   ` Burakov, Anatoly [this message]

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=39c5c720-4c30-435b-ac28-96b2cd10afb3@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=konstantin.ananyev@huawei.com \
    --cc=radu.nicolau@intel.com \
    --cc=sivaprasad.tummala@amd.com \
    --cc=stable@dpdk.org \
    /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).