get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/43352/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 43352,
    "url": "http://patchwork.dpdk.org/api/patches/43352/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180725130009.41756-1-david.hunt@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20180725130009.41756-1-david.hunt@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180725130009.41756-1-david.hunt@intel.com",
    "date": "2018-07-25T13:00:09",
    "name": "[v1] doc/samples: update vm power manager sample docs",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b1e3625c0ca6a5d879be4418b6ff2f0e9955042e",
    "submitter": {
        "id": 342,
        "url": "http://patchwork.dpdk.org/api/people/342/?format=api",
        "name": "Hunt, David",
        "email": "david.hunt@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180725130009.41756-1-david.hunt@intel.com/mbox/",
    "series": [
        {
            "id": 767,
            "url": "http://patchwork.dpdk.org/api/series/767/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=767",
            "date": "2018-07-25T13:00:09",
            "name": "[v1] doc/samples: update vm power manager sample docs",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/767/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/43352/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/43352/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5890031FC;\n\tWed, 25 Jul 2018 15:00:24 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 830B931FC\n\tfor <dev@dpdk.org>; Wed, 25 Jul 2018 15:00:20 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jul 2018 06:00:18 -0700",
            "from silpixa00399952.ir.intel.com (HELO\n\tsilpixa00399952.ger.corp.intel.com) ([10.237.223.64])\n\tby fmsmga008.fm.intel.com with ESMTP; 25 Jul 2018 06:00:17 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,401,1526367600\"; d=\"scan'208\";a=\"57773116\"",
        "From": "David Hunt <david.hunt@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "john.mcnamara@intel.com,\n\tdavid.hunt@intel.com",
        "Date": "Wed, 25 Jul 2018 14:00:09 +0100",
        "Message-Id": "<20180725130009.41756-1-david.hunt@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH v1] doc/samples: update vm power manager sample\n\tdocs",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add information on the ability of guest app to sent\na policy to the host app.\n\nAdd information on the branch ratio out-of-band method\nof workload monitoring and power management.\n\nSigned-off-by: David Hunt <david.hunt@intel.com>\n---\n .../sample_app_ug/vm_power_management.rst     | 165 ++++++++++++++++--\n 1 file changed, 150 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/doc/guides/sample_app_ug/vm_power_management.rst b/doc/guides/sample_app_ug/vm_power_management.rst\nindex cd7c7f341..855570d6b 100644\n--- a/doc/guides/sample_app_ug/vm_power_management.rst\n+++ b/doc/guides/sample_app_ug/vm_power_management.rst\n@@ -20,7 +20,7 @@ running on Virtual Machines(VMs).\n \n The Virtual Machine Power Management solution shows an example of\n how a DPDK application can indicate its processing requirements using VM local\n-only information(vCPU/lcore) to a Host based Monitor which is responsible\n+only information(vCPU/lcore, etc.) to a Host based Monitor which is responsible\n for accepting requests for frequency changes for a vCPU, translating the vCPU\n to a pCPU via libvirt and affecting the change in frequency.\n \n@@ -38,6 +38,26 @@ The solution is comprised of two high-level components:\n    to the librte_power ACPI cpufreq sysfs based library.\n    The Host Application relies on both qemu-kvm and libvirt to function.\n \n+   This monitoring application is responsible for:\n+\n+   - Accepting requests from client applications: Client applications can\n+     request frequency changes for a vCPU, translating\n+     the vCPU to a pCPU via libvirt and affecting the change in frequency.\n+\n+   - Accepting policies from client applications: Client application can\n+     send a policy to the host application. The\n+     host application will then apply the rules of the policy independent\n+     of the application. For example, the policy can contain time-of-day\n+     information for busy/quiet periods, and the host application can scale\n+     up/down the relevant cores when required. See the details of the guest\n+     application below for more information on setting the policy values.\n+\n+   - Out-of-band monitoring of workloads via cores hardware event counters:\n+     The host application can manage power for an application in a virtualised\n+     OR non-virtualised environment by looking at the event counters of the\n+     cores and taking action based on the branch hit/miss ratio. See the host\n+     application '--core-list' command line parameter below.\n+\n #. librte_power for Virtual Machines\n \n    Using an alternate implementation for the librte_power API, requests for\n@@ -174,13 +194,20 @@ Compiling and Running the Host Application\n Compiling\n ~~~~~~~~~\n \n-Compiling the Application\n--------------------------\n-\n-To compile the sample application see :doc:`compiling`.\n+For information on compiling DPDK and the sample applications\n+see :doc:`compiling`.\n \n The application is located in the ``vm_power_manager`` sub-directory.\n \n+To build just the ``vm_power_manager`` application:\n+\n+.. code-block:: console\n+\n+  export RTE_SDK=/path/to/rte_sdk\n+  export RTE_TARGET=build\n+  cd ${RTE_SDK}/examples/vm_power_manager/\n+  make\n+\n Running\n ~~~~~~~\n \n@@ -287,38 +314,129 @@ Manual control and inspection can also be carried in relation CPU frequency scal\n \n     set_cpu_freq {core_num} up|down|min|max\n \n+There are also some command line parameters for enabling the out-of-band\n+monitoring of branch ratio on cores doing busy polling via PMDs.\n+\n+  .. code-block:: console\n+\n+    --core-list {list of cores}\n+\n+  When this parameter is used, the list of cores specified will monitor the ratio\n+  between branch hits and branch misses. A tightly polling PMD thread will have a\n+  very low branch ratio, so the core frequency will be scaled down to the minimim\n+  allowed value. When packets are received, the code path will alter, causing the\n+  branch ratio to increase. When the ratio goes above the ratio threshold, the\n+  core frequency will be scaled up to the maximum allowed value.\n+\n+  .. code-block:: console\n+\n+    --branch-ratio {ratio}\n+\n+  The branch ratio is a floating point number that specifies the threshold at which\n+  to scale up or down for the given workload. The default branch ratio is 0.01,\n+  and will need to be adjusted for different workloads.\n+\n+\n Compiling and Running the Guest Applications\n --------------------------------------------\n \n-For compiling and running l3fwd-power, see :doc:`l3_forward_power_man`.\n+l3fwd-power is one sample application that can be used with vm_power_manager.\n \n A guest CLI is also provided for validating the setup.\n \n For both l3fwd-power and guest CLI, the channels for the VM must be monitored by the\n-host application using the *add_channels* command on the host.\n+host application using the *add_channels* command on the host. This typically uses\n+the following commands in the host application:\n+\n+.. code-block:: console\n+\n+  vm_power> add_vm vmname\n+  vm_power> add_channels vmname all\n+  vm_power> set_channel_status vmname all enabled\n+  vm_power> show_vm vmname\n+\n \n Compiling\n ~~~~~~~~~\n \n-#. export RTE_SDK=/path/to/rte_sdk\n-#. cd ${RTE_SDK}/examples/vm_power_manager/guest_cli\n-#. make\n+For information on compiling DPDK and the sample applications\n+see :doc:`compiling`.\n+\n+For compiling and running l3fwd-power, see :doc:`l3_forward_power_man`.\n+\n+The application is located in the ``guest_cli`` sub-directory under ``vm_power_manager``.\n+\n+To build just the ``guest_vm_power_manager`` application:\n+\n+.. code-block:: console\n+\n+  export RTE_SDK=/path/to/rte_sdk\n+  export RTE_TARGET=build\n+  cd ${RTE_SDK}/examples/vm_power_manager/guest_cli/\n+  make\n \n Running\n ~~~~~~~\n \n-The application does not have any specific command line options other than *EAL*:\n+The standard *EAL* command line parameters are required:\n \n .. code-block:: console\n \n- ./build/vm_power_mgr [EAL options]\n+ ./build/guest_vm_power_mgr [EAL options] -- [guest options]\n \n-The application for example purposes uses a channel for each lcore enabled,\n-for example to run on cores 0,1,2,3 on a system with 4 memory channels:\n+The guest example uses a channel for each lcore enabled. For example,\n+to run on cores 0,1,2,3:\n \n .. code-block:: console\n \n- ./build/guest_vm_power_mgr -l 0-3 -n 4\n+ ./build/guest_vm_power_mgr -l 0-3\n+\n+Optionally, there is a list of command line parameter should the user wish to send a power\n+policy down to the host application. These parameters are as follows:\n+\n+  .. code-block:: console\n+\n+    --vm-name {name of guest vm}\n+\n+  This parameter allows the user to change the Virtual Machine name passed down to the\n+  host application via the power policy. The default is \"ubuntu2\"\n+\n+  .. code-block:: console\n+\n+    --vcpu-list {list vm cores}\n+\n+  A comma-separated list of cores in the VM that the user wants the host application to\n+  monitor. The list of cores in any vm starts at zero, and these are mapped to the\n+  physical cores by the host application once the policy is passed down.\n+  Valid syntax includes individial cores '2,3,4', or a range of cores '2-4', or a\n+  combination of both '1,3,5-7'\n+\n+  .. code-block:: console\n+\n+    --busy-hours {list of busy hours}\n+\n+  A comma-separated list of hours within which to set the core frequency to maximum.\n+  Valid syntax includes individial hours '2,3,4', or a range of hours '2-4', or a\n+  combination of both '1,3,5-7'. Valid hours are 0 to 23.\n+\n+  .. code-block:: console\n+\n+    --quiet-hours {list of quiet hours}\n+\n+  A comma-separated list of hours within which to set the core frequency to minimum.\n+  Valid syntax includes individial hours '2,3,4', or a range of hours '2-4', or a\n+  combination of both '1,3,5-7'. Valid hours are 0 to 23.\n+\n+  .. code-block:: console\n+\n+    --policy {policy type}\n+\n+  The type of policy. This can be one of the following values:\n+  TRAFFIC - based on incoming traffic rates on the NIC.\n+  TIME - busy/quiet hours policy.\n+  BRANCH_RATIO - uses branch ratio counters to determine core busyness.\n+  Not all parameters are needed for all policy types. For example, BRANCH_RATIO\n+  only needs the vcpu-list parameter, not any of the hours.\n \n \n After successful initialization the user is presented with VM Power Manager Guest CLI:\n@@ -333,3 +451,20 @@ Where {core_num} is the lcore and channel to change frequency by scaling up/down\n .. code-block:: console\n \n   set_cpu_freq {core_num} up|down|min|max\n+\n+To start the application and configure the power policy, and send it to the host:\n+\n+.. code-block:: console\n+\n+ ./build/guest_vm_power_mgr -l 0-3 -n 4 -- --vm-name=ubuntu --policy=BRANCH_RATIO --vcpu-list=2-4\n+\n+Once the VM Power Manager Guest CLI appears, issuing the 'send_policy now' command\n+will send the policy to the host:\n+\n+.. code-block:: console\n+\n+  send_policy now\n+\n+Once the policy is sent to the host, the host application takes over the power monitoring\n+of the specified cores in the policy.\n+\n",
    "prefixes": [
        "v1"
    ]
}