From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01CC0C4332F for ; Fri, 11 Nov 2022 08:22:19 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 29DFA40143; Fri, 11 Nov 2022 09:22:19 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id E553440141 for ; Fri, 11 Nov 2022 09:22:16 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 17E803200931; Fri, 11 Nov 2022 03:22:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 11 Nov 2022 03:22:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1668154934; x= 1668241334; bh=l54EMXyrPJcfqAmh4+u7CespmY0nIH8Rp8+V5Cz8Uhg=; b=W GcLQ/64BStdAWlGa+sOJ+byaviw11XDl198O+eGLuKXorGWG+SSY+NH16pc94bfm Wlh1AabAFe6RwiUyKya1Oj196P/Z71XCWgYRThHpnkBMDd8JlVINALdiFKxewOVR OzGKO5XlRcTSWy0U++YpJw1d6Z9ZvZvz9e+nfJtJqjrSufn6afrvdbjNgzHKS4VQ skQ9EDzCGraYumEMFEL265oGk7SWfYZHM0HjL/kCO9A85Juzp+giUCeLrxZ6QCkz g2yAwJ1F6b/sDlQO37n5lKbnKfDeXHwc4fwGM+eq605DFlT+BAi1OMsgKRDZf0RO p3foir+q69RtcfoZGYWRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1668154934; x= 1668241334; bh=l54EMXyrPJcfqAmh4+u7CespmY0nIH8Rp8+V5Cz8Uhg=; b=V 6197l6GMxK7xSz8L9nFd1cOqeAwxr2uDWlgW6Ie1Hh+na7JWd8/EDSIacp5nkXWz 5UJVG9qQKX7l+C/aSuceeFdkxu/CXKuB+ornaKhwOgdmaJhBk0oshQeJ3jloPDy9 lhzfgcM6ML2qv3kkrlxbOPE4q9uFFcO9++O/LWoLjdRaJ51vJnXJNfXEobGwp20O 7ImgiG249+8PEJmtEI9DdHOSP/T55qgUajXYpypg1nxJPLju3IW1O+eiWQSKHEst QQ4EYEstxbHVeNQB9fuV/Rwyl5JgUObMGA2pPXs51eqmUCbvFmaZZwQ4+nKhCm9G D/AsmovC6TLu3NB6czUzg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfeehgdduvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Nov 2022 03:22:13 -0500 (EST) From: Thomas Monjalon To: Feifei Wang Cc: David Hunt , dev@dpdk.org, david.marchand@redhat.com, stephen@networkplumber.org, nd@arm.com, Ruifeng Wang , honnappa.nagarahalli@arm.com Subject: Re: [PATCH v3 3/3] examples/l3fwd-power: enable PMD power monitor on Arm Date: Fri, 11 Nov 2022 09:22:11 +0100 Message-ID: <1834560.u6TykanW85@thomas> In-Reply-To: <20221111072649.3304429-4-feifei.wang2@arm.com> References: <20220825064251.2637274-1-feifei.wang2@arm.com> <20221111072649.3304429-1-feifei.wang2@arm.com> <20221111072649.3304429-4-feifei.wang2@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 11/11/2022 08:26, Feifei Wang: > For Arm aarch, power monitor uses WFE instruction to enable, which can > not exit automatically within the time limit. This means > 'rte_power_monitor_wakeup' API needs to be called to wake up sleep cores > if there is no store operation to monitored address. > > Furthermore, we disable power monitor feature on the main core so that > it can be used to wake up other sleeping cores after it exit from loop. > > Signed-off-by: Feifei Wang > Reviewed-by: Ruifeng Wang > Acked-by: David Hunt > --- > +#if defined(RTE_ARCH_ARM64) > + /* Ensure the main lcore does not enter the power-monitor state, > + * so that it can be used to wake up other lcores on ARM. > + * This is due to WFE instruction has no timeout wake-up mechanism, > + * and if users want to exit actively, the main lcore is needed > + * to send SEV instruction to wake up other lcores. > + */ > + unsigned int main_lcore = rte_get_main_lcore(); > + if (lcore_id == main_lcore && > + pmgmt_type == RTE_POWER_MGMT_TYPE_MONITOR) > + continue; > +#endif We need to have this logic abstracted in the API for all architectures. We cannot afford having such #ifdef per CPU in the application.