From: Hajkowski <marcinx.hajkowski@intel.com>
To: david.hunt@intel.com
Cc: dev@dpdk.org, Marcin Hajkowski <marcinx.hajkowski@intel.com>,
Lukasz Krakowiak <lukaszx.krakowiak@intel.com>,
Lukasz Gosiewski <lukaszx.gosiewski@intel.com>
Subject: [dpdk-dev] [PATCH v4 2/2] doc: update according to the fifo per core impl
Date: Thu, 13 Jun 2019 11:21:17 +0200 [thread overview]
Message-ID: <20190613092117.7252-3-marcinx.hajkowski@intel.com> (raw)
In-Reply-To: <20190613092117.7252-1-marcinx.hajkowski@intel.com>
From: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Updated power management docs for fifo JSON API.
Removed from JSON API:
* 'name'
* 'resource_id'
* 'core_list'
Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Signed-off-by: Lukasz Gosiewski <lukaszx.gosiewski@intel.com>
---
.../sample_app_ug/vm_power_management.rst | 61 +++++--------------
1 file changed, 14 insertions(+), 47 deletions(-)
diff --git a/doc/guides/sample_app_ug/vm_power_management.rst b/doc/guides/sample_app_ug/vm_power_management.rst
index 5d9a26172..0ffff835e 100644
--- a/doc/guides/sample_app_ug/vm_power_management.rst
+++ b/doc/guides/sample_app_ug/vm_power_management.rst
@@ -380,9 +380,16 @@ parsing functionality will not be present in the app.
Sending a command or policy to the power manager application is achieved by
simply opening a fifo file, writing a JSON string to that fifo, and closing
-the file.
+the file. In actual implementation every core has own dedicated fifo[0..n],
+where n is number of the last available core.
+Having a dedicated fifo file per core allows using standard filesystem permissions
+to ensure a given container can only write JSON commands into fifos it is allowed
+to use.
-The fifo is at /tmp/powermonitor/fifo
+The fifo is at /tmp/powermonitor/fifo[0..n]
+
+For example all cmds put to the /tmp/powermonitor/fifo7, will have
+effect only on CPU[7].
The JSON string can be a policy or instruction, and takes the following
format:
@@ -405,19 +412,6 @@ arrays, etc. Examples of policies follow later in this document. The allowed
names and value types are as follows:
-:Pair Name: "name"
-:Description: Name of the VM or Host. Allows the parser to associate the
- policy with the relevant VM or Host OS.
-:Type: string
-:Values: any valid string
-:Required: yes
-:Example:
-
- .. code-block:: javascript
-
- "name", "ubuntu2"
-
-
:Pair Name: "command"
:Description: The type of packet we're sending to the power manager. We can be
creating or destroying a policy, or sending a direct command to adjust
@@ -509,17 +503,6 @@ names and value types are as follows:
"max_packet_thresh": 500000
-:Pair Name: "core_list"
-:Description: The cores to which to apply the policy.
-:Type: array of integers
-:Values: array with list of virtual CPUs.
-:Required: only policy CREATE/DESTROY
-:Example:
-
- .. code-block:: javascript
-
- "core_list":[ 10, 11 ]
-
:Pair Name: "workload"
:Description: When our policy is of type WORKLOAD, we need to specify how
heavy our workload is.
@@ -566,17 +549,6 @@ names and value types are as follows:
"unit", "SCALE_MAX"
-:Pair Name: "resource_id"
-:Description: The core to which to apply the power command.
-:Type: integer
-:Values: valid core id for VM or host OS.
-:Required: only POWER instruction
-:Example:
-
- .. code-block:: javascript
-
- "resource_id": 10
-
JSON API Examples
~~~~~~~~~~~~~~~~~
@@ -585,12 +557,10 @@ Profile create example:
.. code-block:: javascript
{"policy": {
- "name": "ubuntu",
"command": "create",
"policy_type": "TIME",
"busy_hours":[ 17, 18, 19, 20, 21, 22, 23 ],
- "quiet_hours":[ 2, 3, 4, 5, 6 ],
- "core_list":[ 11 ]
+ "quiet_hours":[ 2, 3, 4, 5, 6 ]
}}
Profile destroy example:
@@ -598,8 +568,7 @@ Profile destroy example:
.. code-block:: javascript
{"policy": {
- "name": "ubuntu",
- "command": "destroy",
+ "command": "destroy"
}}
Power command example:
@@ -607,18 +576,16 @@ Power command example:
.. code-block:: javascript
{"instruction": {
- "name": "ubuntu",
"command": "power",
- "unit": "SCALE_MAX",
- "resource_id": 10
+ "unit": "SCALE_MAX"
}}
To send a JSON string to the Power Manager application, simply paste the
-example JSON string into a text file and cat it into the fifo:
+example JSON string into a text file and cat it into the proper fifo:
.. code-block:: console
- cat file.json >/tmp/powermonitor/fifo
+ cat file.json >/tmp/powermonitor/fifo[0..n]
The console of the Power Manager application should indicate the command that
was just received via the fifo.
--
2.17.2
next prev parent reply other threads:[~2019-06-13 9:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 10:45 [dpdk-dev] [PATCH 0/2] power: add fifo per core for JSON interface Lukasz Krakowiak
2019-04-08 10:45 ` Lukasz Krakowiak
2019-04-08 10:45 ` [dpdk-dev] [PATCH 1/2] " Lukasz Krakowiak
2019-04-08 10:45 ` Lukasz Krakowiak
2019-04-08 10:45 ` [dpdk-dev] [PATCH 2/2] doc: update according to the fifo per core impl Lukasz Krakowiak
2019-04-08 10:45 ` Lukasz Krakowiak
2019-04-12 13:54 ` [dpdk-dev] [PATCH v2 0/2] power: add fifo per core for JSON interface Lukasz Gosiewski
2019-04-12 13:54 ` Lukasz Gosiewski
2019-04-12 13:54 ` [dpdk-dev] [PATCH v2 1/2] " Lukasz Gosiewski
2019-04-12 13:54 ` Lukasz Gosiewski
2019-04-12 13:54 ` [dpdk-dev] [PATCH v2 2/2] doc: update according to the fifo per core impl Lukasz Gosiewski
2019-04-12 13:54 ` Lukasz Gosiewski
2019-04-22 20:37 ` [dpdk-dev] [PATCH v2 0/2] power: add fifo per core for JSON interface Thomas Monjalon
2019-04-22 20:37 ` Thomas Monjalon
2019-04-24 8:21 ` [dpdk-dev] [PATCH v3 0/2] " Lukasz Gosiewski
2019-04-24 8:21 ` Lukasz Gosiewski
2019-04-24 8:21 ` [dpdk-dev] [PATCH v3 1/2] power: " Lukasz Gosiewski
2019-04-24 8:21 ` Lukasz Gosiewski
2019-06-07 8:26 ` Hajkowski, MarcinX
2019-04-24 8:21 ` [dpdk-dev] [PATCH v3 2/2] doc: update according to the fifo per core impl Lukasz Gosiewski
2019-04-24 8:21 ` Lukasz Gosiewski
2019-06-13 9:21 ` [dpdk-dev] [PATCH v4 0/2] Fifo per core Hajkowski
2019-06-13 9:21 ` [dpdk-dev] [PATCH v4 1/2] power: add fifo per core for JSON interface Hajkowski
2019-07-08 13:44 ` Burakov, Anatoly
2019-07-09 15:07 ` [dpdk-dev] [PATCH v5] " David Hunt
2019-07-09 15:12 ` Burakov, Anatoly
2019-07-09 15:23 ` Hunt, David
2019-07-09 15:21 ` [dpdk-dev] [PATCH v6] " David Hunt
2019-07-09 15:27 ` Hunt, David
2019-07-09 15:38 ` Thomas Monjalon
2019-07-10 21:55 ` Thomas Monjalon
2019-06-13 9:21 ` Hajkowski [this message]
2019-07-08 13:34 ` [dpdk-dev] [PATCH v4 2/2] doc: update according to the fifo per core impl Burakov, Anatoly
2019-07-08 15:46 ` Hunt, David
2019-07-04 20:09 ` [dpdk-dev] [PATCH v4 0/2] Fifo per core Thomas Monjalon
2019-06-07 8:50 ` [dpdk-dev] [PATCH 0/2] power: add fifo per core for JSON interface Hajkowski, MarcinX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190613092117.7252-3-marcinx.hajkowski@intel.com \
--to=marcinx.hajkowski@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=lukaszx.gosiewski@intel.com \
--cc=lukaszx.krakowiak@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).