From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 6AEFF333 for ; Tue, 23 Sep 2014 09:43:41 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 23 Sep 2014 00:49:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,578,1406617200"; d="scan'208";a="603877817" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga002.fm.intel.com with ESMTP; 23 Sep 2014 00:49:46 -0700 Received: from irsmsx105.ger.corp.intel.com (163.33.3.28) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 23 Sep 2014 08:48:31 +0100 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.200]) by IRSMSX105.ger.corp.intel.com ([169.254.7.158]) with mapi id 14.03.0195.001; Tue, 23 Sep 2014 08:48:31 +0100 From: "Carew, Alan" To: Neil Horman Thread-Topic: [dpdk-dev] [PATCH 06/10] Alternate implementation of librte_power for VM Power Management(Guest). Thread-Index: AQHP1pn/yZIfrIAhEUyWq4UvGHtnuZwOVEFw Date: Tue, 23 Sep 2014 07:48:31 +0000 Message-ID: <0E29434AEE0C3A4180987AB476A6F6306D2775F2@IRSMSX109.ger.corp.intel.com> References: <1411410879-28872-1-git-send-email-alan.carew@intel.com> <1411410879-28872-7-git-send-email-alan.carew@intel.com> <20140922191753.GH25406@hmsreliant.think-freely.org> In-Reply-To: <20140922191753.GH25406@hmsreliant.think-freely.org> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 06/10] Alternate implementation of librte_power for VM Power Management(Guest). X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2014 07:43:41 -0000 Hi Neil, > -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Monday, September 22, 2014 8:18 PM > To: Carew, Alan > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 06/10] Alternate implementation of > librte_power for VM Power Management(Guest). >=20 > On Mon, Sep 22, 2014 at 07:34:35PM +0100, Alan Carew wrote: > > Re-using the host based librte_power API the alternate implementation u= ses > > the guest channel API to forward request for frequency changes to the h= ost > > monitor. > > A subset of the librte_power API is supported: > > rte_power_init(unsigned lcore_id) > > rte_power_exit(unsigned lcore_id) > > rte_power_freq_up(unsigned lcore_id) > > rte_power_freq_down(unsigned lcore_id) > > rte_power_freq_min(unsigned lcore_id) > > rte_power_freq_max(unsigned lcore_id) > > > > The other unsupported APIs from librte_power return -ENOTSUP. > > > > Signed-off-by: Alan Carew > > --- > > lib/librte_power_vm/Makefile | 49 ++++++++++++++ > > lib/librte_power_vm/rte_power.c | 146 > ++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 195 insertions(+) > > create mode 100644 lib/librte_power_vm/Makefile > > create mode 100644 lib/librte_power_vm/rte_power.c > > > NAK. > This is a bad design choice. Creating an alternate library with all the = same > symbols in place prevents an application from compiling in support for bo= th host > and guest power management in parallel (i.e. if an app wants to be able t= o do > power management in either environment, and only gets built once, it won'= t > work). >=20 > In fact, linking a statically built library with both CONFIG_RTE_LIBRTE_P= OWER=3Dy > and CONFIG_RTE_LIBRTE_POWER_VM=3Dy yields the following link-time build > break: >=20 > LD test > /home/nhorman/git/dpdk/build/lib/librte_power.a(guest_channel.o): In > function > `guest_channel_host_connect': > guest_channel.c:(.text+0x0): multiple definition of > `guest_channel_host_connect' > /home/nhorman/git/dpdk/build/lib/librte_power.a(guest_channel.o):guest_ch= a > nnel.c:(.text+0x0): > first defined here > /home/nhorman/git/dpdk/build/lib/librte_power.a(guest_channel.o): In > function > `guest_channel_send_msg': > guest_channel.c:(.text+0x370): multiple definition of `guest_channel_send= _msg' > .... > Ad nauseum. >=20 > What you should do is merge this functionality in with the existing librt= e power > library, and make the choice of implementation a run time decision, so th= eres > only a single public facing API symbol set, and both implementations can > coexist, getting chosen at run time (via initialization config option, > environment detection, etc). Konstantin and I had a simmilar discussion > regarding the ACL library and the use of the match function. I think we = came up > with some reasonably performant solutions. >=20 > Neil Makes sense, I'll take a look at runtime configuration options and post a V= 2. Thanks, Alan=20