From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id EEA755689 for ; Wed, 26 Sep 2018 15:41:25 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 06:41:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,306,1534834800"; d="scan'208";a="83404367" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.223.64]) by FMSMGA003.fm.intel.com with ESMTP; 26 Sep 2018 06:41:20 -0700 From: David Hunt To: dev@dpdk.org Cc: john.mcnamara@intel.com, stephen@networkplumber.org, lei.a.yao@intel.com, anatoly.burakov@intel.com Date: Wed, 26 Sep 2018 14:40:26 +0100 Message-Id: <20180926134037.43606-1-david.hunt@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180914135406.52190-1-david.hunt@intel.com> References: <20180914135406.52190-1-david.hunt@intel.com> Subject: [dpdk-dev] [PATCH v4 0/11] add json power policy interface for containers 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: Wed, 26 Sep 2018 13:41:26 -0000 The current vm_power_manager example app has the capability to accept power policies from virtual machines via virtio-serial channels. These power policies allow a virtual machine to give information to the power manager to allow the power manager take care of the power management of the virtual machine based on the information in the policy. This power policy functionality is limited to virtual machines sending the policies to the power manager (which runs in the Host OS), and a solution was needed for additional methods of sending power policies to the power manager app. The main use-case for this modification is for containers and host applications that wish to send polices to the power manager. This patchset adds the capability to send power polices and power commands to the vm_power_manager app via JSON strings through a fifo on the file system. For example, given the following file, policy.json: {"policy": { "name": "ubuntu2", "command": "create", "policy_type": "TIME", "busy_hours":[ 17, 18, 19, 20, 21, 22, 23 ], "quiet_hours":[ 2, 3, 4, 5, 6 ], "core_list":[ 11, 12, 13 ] }} Then running the command: cat policy.json >/tmp/powermonitor/fifo The policy is sent to the vm_power_manager. The power manager app then parses the JSON data, and inserts the policy into the array of policies. Part of the patch series contains documentation updates to give all the details of the valid name-value pairs, the data types, etc. Patch v2: * Fixed review comments from Stephen Hemminger and Lei A Yao. * Added a check in the Makefile for libjansson-dev. Will Warn user and build without JSON functionality if not present, will build including JSON functionality if it is present. Patch v3: * Added meson/ninja support for vm_power_manager and guest_cli apps * Fixed compilation issue with guest_cli app Patch v4: * Split out some unrelated changes to separate patches in the set * Some changes out of review by Anatoly (Thanks!) [01/11] examples/power: add checks around hypervisor [02/11] examples/power: allow for number of vms to be zero [03/11] lib/power: add changes for host commands/policies [04/11] examples/power: add necessary changes to guest app [05/11] examples/power: add host channel to power manager [06/11] examples/power: increase allowed number of clients [07/11] examples/power: add json string handling [08/11] examples/power: clean up verbose messages [09/11] examples/power: add meson/ninja build support [10/11] doc/vm_power_manager: add JSON interface API info [11/11] examples/power: add json example files