From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id B59E31B1FB for ; Thu, 12 Jul 2018 21:09:19 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 30CDD221E7; Thu, 12 Jul 2018 15:09:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 12 Jul 2018 15:09:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=2eDvr9U9jf7e6xRvybuWXRqMwF Z02pHz4jZBAmmeBD0=; b=TydKPpLNwYLiIRkge2Et8PI5Bw6VQyNueFoLuYUqCD 6NfBsoBsnuWaBqgVdqNUscSvKRZ1EH2hmQkHqJEDNcPvag24i4hDGJhNO63tJFrW 4ya8keBHwdwsIu5cxVuevLh8VcUFrRxSFbgNGntKvoPRVl/ZkhgQAptis2yesIvJ s= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=2eDvr9 U9jf7e6xRvybuWXRqMwFZ02pHz4jZBAmmeBD0=; b=jyPoVQuJsH1sXcpwRKXma/ YhmY5mNhA5+Wgc8IlQBds314CGj7fXM3K9gMuUmCLzr4sw5IfW2PLTUgu4io7kGw Q6IFl9qSIGgb/JQq6n1z/0S78lIyBBE7aPBXjQSu880IAtoSrNMs18cMLlPp0J7P nt8cVOYMn/rAtNMiyBmnY1v9dHWwPf+YlT6o7MdIxzz2WAY9Jn66QAV7qr96aZ+4 GHmD1eAhBTCr31A1ktEfITGoR1BCVqhpP3IHEMCMIXzAoIRU4azRwXyYy47gwlmS DiNcqf69X0FR+1euPLnc8Ml04GNczX4u01r2r+e+ay8K+Yy0nWry6KTBnat9myzA == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D4B9EE410A; Thu, 12 Jul 2018 15:09:17 -0400 (EDT) From: Thomas Monjalon To: David Hunt Cc: dev@dpdk.org, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, arybchenko@solarflare.com, ferruh.yigit@intel.com, bruce.richardson@intel.com Date: Thu, 12 Jul 2018 21:09:16 +0200 Message-ID: <2730584.abn78hPeQH@xps> In-Reply-To: <20180626092317.11031-1-david.hunt@intel.com> References: <20180621132414.39047-2-david.hunt@intel.com> <20180626092317.11031-1-david.hunt@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [0/9] examples/vm_power: 100% Busy Polling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2018 19:09:20 -0000 26/06/2018 11:23, David Hunt: > This patch set adds the capability to do out-of-band power > monitoring on a system. It uses a thread to monitor the branch > counters in the targeted cores, and calculates the branch ratio > if the running code. > > If the branch ratop is low (0.01), then > the code is most likely running in a tight poll loop and doing > nothing, i.e. receiving no packets. In this case we scale down > the frequency of that core. > > If the branch ratio is higher (>0.01), then it is likely that > the code is receiving and processing packets. In this case, we > scale up the frequency of that core. > > The cpu counters are read via /dev/cpu/x/msr, so requires the > msr kernel module to be loaded. Because this method is used, > the patch set is implemented with one file for x86 systems, and > another for non-x86 systems, with conditional compilation in > the Makefile. The non-x86 functions are stubs, and do not > currently implement any functionality. > > The vm_power_manager app has been modified to take a new parameter > --core-list or -l > which takes a list of cores in a comma-separated list format, > e.g. 1,3,5-7,9, which resolvest to a core list of 1,3,5,6,7,9 > These cores will then be enabled for oob monitoring. When the > OOB monitoring thread starts, it reads the branch hits/miss > counters of each monitored core, and scales up/down accordingly. It looks to be a feature which could be integrated in DPDK libs. Why choosing to implement it fully in an example?