From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 4011545B69;
	Fri, 18 Oct 2024 12:16:03 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id DE8D440265;
	Fri, 18 Oct 2024 12:16:02 +0200 (CEST)
Received: from fout-a5-smtp.messagingengine.com
 (fout-a5-smtp.messagingengine.com [103.168.172.148])
 by mails.dpdk.org (Postfix) with ESMTP id B0A684025F
 for <dev@dpdk.org>; Fri, 18 Oct 2024 12:16:01 +0200 (CEST)
Received: from phl-compute-02.internal (phl-compute-02.phl.internal
 [10.202.2.42])
 by mailfout.phl.internal (Postfix) with ESMTP id 24A0E13801DD;
 Fri, 18 Oct 2024 06:16:01 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
 by phl-compute-02.internal (MEProxy); Fri, 18 Oct 2024 06:16:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1729246561;
 x=1729332961; bh=+EeMmJQNRRM/5NBrb6DUiR23GuRyeY+OMNmkxeViO9M=; b=
 TdQ+Ib4TQokTyA3PU2ch+EOuqL6dy7arZowZ09oClZqliOimZdjvbCU7M3HUTuer
 Sc8DAdNrOIxRMN8ODi/J6+EZJVjJgLHONZDAW4cZL+LqizDqrsgd8auC7gyZGtUC
 l4mn9HoSiZnlaJSObSNNAFim/32jDxgGuGSsZjQv/IndHtbnlI9OaSUD0gGFUsPo
 C09Ce5VFKmTGDNXPwYW2iBJFzIb02JyXNpjwPu+QLX5zPHZCEMmxOCb1K8yjpL1b
 ShNTyl+ye8NkLaT+OFnGGYAU0niRCe0nxQtVlpv0WLqfIssS2iMGlp8mMAedBMYp
 0VCOLtlIHw7deMEMIHvcOg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1729246561; x=
 1729332961; bh=+EeMmJQNRRM/5NBrb6DUiR23GuRyeY+OMNmkxeViO9M=; b=L
 dT54//dBctgF8MIR7HoCgBno2CCh84ww+F3ZWo52V6gKq9OD9ojRp4UdCsJ7luTR
 TPn5zoVSWwpLMxlo/UGkKS7m6uljzBZodQ9ze+HM0+n/zA/UPJCc259Xqfu6lV71
 LzB5MtU2pDEA1x04nloXuco5HX2JsI5SRbdioM5VdA1LY3BMZCmfXoVD9BOuUkCd
 J8ZgkaYsRymPaSiKZSP0nXU2OEVLoK2fjSxh03KqiXVjGEDWS+Z1Ou3FL55QTcUy
 tHJkFTWgQXjP2SREs1yW3IDV87AbSwG/amQ4zNw50gDbvqJT1m63ttdjgmp1JL1D
 xdms9lu+sPpZ5XLfr6vnA==
X-ME-Sender: <xms:YDUSZzMO4YJiPqkk8A85ZQMPW9oOmk0gqlAinh_5rh8EhRc-kjhLlw>
 <xme:YDUSZ9_5joV1cUgE_A8xVMtonoWaBYCiliacWptFvdN1Wo0TofZDr7NFutQJ5Gl6X
 hzvhvO_gwgfLEdLIA>
X-ME-Received: <xmr:YDUSZyQWUwUWI8FSpnsqpCS3gG_gd3bGNkJSjSuSoO_d0hjfmVBxgyo4SN_o7vimqI77CVdTO3qYhdC3XFTX13AQUw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehfedgvdegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeen
 ucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrg
 hlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeejudevheeiveduuddtveffgfdtgeek
 ueevjeffjeegtdeggeekgfdvuefgfeekjeenucevlhhushhtvghrufhiiigvpedtnecurf
 grrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtpdhn
 sggprhgtphhtthhopeduuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshhivh
 grphhrrghsrggurdhtuhhmmhgrlhgrsegrmhgurdgtohhmpdhrtghpthhtohepuggrvhhi
 ugdrhhhunhhtsehinhhtvghlrdgtohhmpdhrtghpthhtoheprghnrghtohhlhidrsghurh
 grkhhovhesihhnthgvlhdrtghomhdprhgtphhtthhopehjvghrihhnjhesmhgrrhhvvghl
 lhdrtghomhdprhgtphhtthhopehrrgguuhdrnhhitgholhgruhesihhnthgvlhdrtghomh
 dprhgtphhtthhopehgrghkhhhilhesmhgrrhhvvghllhdrtghomhdprhgtphhtthhopegt
 rhhishhtihgrnhdrughumhhithhrvghstghusehinhhtvghlrdgtohhmpdhrtghpthhtoh
 epfhgvrhhruhhhrdihihhgihhtsegrmhgurdgtohhmpdhrtghpthhtohepkhhonhhsthgr
 nhhtihhnrdgrnhgrnhihvghvsehhuhgrfigvihdrtghomh
X-ME-Proxy: <xmx:YDUSZ3sxWND7qQTuwyfl5D9TxcMEEbno5m8eBcWcSQCvJqDCvihbmg>
 <xmx:YDUSZ7dXqXWn2dxQFLs9EjcDpaFd4mhW1cpWjExjuxAoOR3NXcqH6w>
 <xmx:YDUSZz1fg01Pbz5KCaSx5Rt37T6UMZkS6XMJQvY-OVOWR8JOeDqxQw>
 <xmx:YDUSZ3_sWS1xKBWdBJ_WfjmVvtQ148EKxZDVKw0rpsCVpAlxO31WSw>
 <xmx:YTUSZz27U_uP24bfJdrE0tC_pb93DsdZB8PZSAN_2huaMPXrp1-q8sc1>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 18 Oct 2024 06:15:59 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Cc: david.hunt@intel.com, anatoly.burakov@intel.com, jerinj@marvell.com,
 radu.nicolau@intel.com, gakhil@marvell.com, cristian.dumitrescu@intel.com,
 ferruh.yigit@amd.com, konstantin.ananyev@huawei.com, dev@dpdk.org,
 Huisong Li <lihuisong@huawei.com>
Subject: Re: [PATCH v2 1/2] power: fix power library with --lcores
Date: Fri, 18 Oct 2024 12:15:57 +0200
Message-ID: <3066036.BaHzMo0RvP@thomas>
In-Reply-To: <20241018033435.1305782-1-sivaprasad.tummala@amd.com>
References: <20241017110247.1051770-1-sivaprasad.tummala@amd.com>
 <20241018033435.1305782-1-sivaprasad.tummala@amd.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

18/10/2024 05:34, Sivaprasad Tummala:
> This commit fixes an issue in the power library
> related to using lcores mapped to different
> physical cores (--lcores option in EAL).
> 
> Previously, the power library incorrectly accessed
> CPU sysfs attributes for power management, treating
> lcore IDs as CPU IDs.
> e.g. with --lcores '1@128', lcore_id '1' was interpreted
> as CPU_id instead of '128'.
> 
> This patch corrects the cpu_id based on lcore and CPU
> mappings. It also constraints power management support
> for lcores mapped to multiple physical cores/threads.
> 
> When multiple lcores are mapped to the same physical core,
> invoking frequency scaling APIs on any lcore will apply the
> changes effectively.
> 
> v2:
>  - renamed check_lcore_and_set_cpu to power_get_lcore_mapped_cpu_id
> 
> Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
> Acked-by: Huisong Li <lihuisong@huawei.com>

Applied with style edits and Fixes/Cc, thanks.