Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807104/?format=api
{ "id": 807104, "url": "http://patchwork.ozlabs.org/api/patches/807104/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1504016587-39779-6-git-send-email-pradeep.jagadeesh@huawei.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504016587-39779-6-git-send-email-pradeep.jagadeesh@huawei.com>", "list_archive_url": null, "date": "2017-08-29T14:23:06", "name": "[v8,5/6] fsdev: hmp interface for throttling", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "7e9606403d53082a12ce3d8bab0b2adc8e16f9ea", "submitter": { "id": 69852, "url": "http://patchwork.ozlabs.org/api/people/69852/?format=api", "name": "Pradeep Jagadeesh", "email": "pradeepkiruvale@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1504016587-39779-6-git-send-email-pradeep.jagadeesh@huawei.com/mbox/", "series": [ { "id": 377, "url": "http://patchwork.ozlabs.org/api/series/377/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=377", "date": "2017-08-29T14:23:01", "name": "fsdev: qmp interface for io throttling", "version": 8, "mbox": "http://patchwork.ozlabs.org/series/377/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807104/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807104/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fPjS0j8E\"; dkim-atps=neutral" ], "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhWB110nnz9t16\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 00:24:57 +1000 (AEST)", "from localhost ([::1]:45211 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dmhRn-0001lE-07\n\tfor incoming@patchwork.ozlabs.org; Tue, 29 Aug 2017 10:24:55 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:53714)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pradeepkiruvale@gmail.com>) id 1dmhQy-0001go-VV\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:24:09 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pradeepkiruvale@gmail.com>) id 1dmhQx-0004Ek-Sg\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:24:04 -0400", "from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:36720)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <pradeepkiruvale@gmail.com>)\n\tid 1dmhQx-0004EN-Jj\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 10:24:03 -0400", "by mail-wr0-x243.google.com with SMTP id 40so2194055wrv.3\n\tfor <qemu-devel@nongnu.org>; Tue, 29 Aug 2017 07:24:03 -0700 (PDT)", "from localhost.localdomain.localdomain ([217.110.131.66])\n\tby smtp.gmail.com with ESMTPSA id\n\t15sm2540487wmv.45.2017.08.29.07.24.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 29 Aug 2017 07:24:01 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=eKrlh9zg8th8mFz103ypbzRThDmre+y56U3DVu642Qs=;\n\tb=fPjS0j8E7O0fPydphs+7qPwwAbB8UfZKso4vpQoc1knGgr5SWbG3r3mkfBX+S07W4+\n\tkf0ExxdkuOrOuVyPFzEedMOYnwcgRMUbg2bE3oUwe7CS8915An/GvrjCT7c7iaQqi2Kx\n\tmw8c762X2D2c3JDURYENbdvJJ6iZfZi3OruamxlZUkZnywmzLMyO5JHdcXP80JYtmA2k\n\tMLjeYYPbw8VCOab0K637O49NMKR219IEtZSH0QQmm8OXtvgSMBEW8cvzI2Ew+WSjGEXL\n\tylhJFNyR+MMn3JaBkgoUy8ZVJ/uDupKdzm4sxNEt8FBTd8jwEOxcElSwBJkHtWge0QZ3\n\tdawQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=eKrlh9zg8th8mFz103ypbzRThDmre+y56U3DVu642Qs=;\n\tb=e9Fz66joy0LoQRkQPTfT67WvTUevGeOBHwhpoaRSsWmwICMObwmQrHKYmg2fSmVDDE\n\tOru0G5BwOSj7dGkGHLJiVh5IPjJf2ysXpkS8O1053uFS9S3NXoPLmmoXaQPe43q/L8lF\n\t6Xrv5VhRdhIKqOqwiddjePAaxPOlTWUw1QaD81pR7SZ1gR7O0SdU0YEydhJixfsaWP8z\n\tJ546AT0ox76ZP34NOVk0ixQOjhfFLjq4HFVGMjUmDgKSIeOg2KIMBR9HwAfeXfsgl6gQ\n\tX2FA0dEVFigJAuOSCSxEDEeGn9/Q7Vnhw0GEXB5RsyWBBBRRC2crAwKbAgxvu2jk5LNv\n\tQHdA==", "X-Gm-Message-State": "AHYfb5hmidmDZEuVjYFUkJPR3mHM+X4ykV4FD8hFAiaW2K2fAOedxE5Z\n\tzSfjWpgZM7c10CAqXfE=", "X-Received": "by 10.223.128.163 with SMTP id 32mr328555wrl.179.1504016642521; \n\tTue, 29 Aug 2017 07:24:02 -0700 (PDT)", "From": "Pradeep Jagadeesh <pradeepkiruvale@gmail.com>", "X-Google-Original-From": "Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>", "To": "\"eric blake\" <eblake@redhat.com>,\n\t\"greg kurz\" <groug@kaod.org>", "Date": "Tue, 29 Aug 2017 10:23:06 -0400", "Message-Id": "<1504016587-39779-6-git-send-email-pradeep.jagadeesh@huawei.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1504016587-39779-1-git-send-email-pradeep.jagadeesh@huawei.com>", "References": "<1504016587-39779-1-git-send-email-pradeep.jagadeesh@huawei.com>", "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.", "X-Received-From": "2a00:1450:400c:c0c::243", "Subject": "[Qemu-devel] [PATCH v8 5/6] fsdev: hmp interface for throttling", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "qemu-devel@nongnu.org, jani kokkonen <jani.kokkonen@huawei.com>,\n\talberto garcia <berto@igalia.com>,\n\tPradeep Jagadeesh <pradeep.jagadeesh@huawei.com>,\n\t\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "This patch introduces hmp interfaces for the fsdev\ndevices.\n\nSigned-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com>\n---\n hmp-commands-info.hx | 18 +++++++++++++++\n hmp-commands.hx | 19 ++++++++++++++++\n hmp.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++\n hmp.h | 4 ++++\n 4 files changed, 103 insertions(+)", "diff": "diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx\nindex d9df238..07ed338 100644\n--- a/hmp-commands-info.hx\n+++ b/hmp-commands-info.hx\n@@ -84,6 +84,24 @@ STEXI\n Show block device statistics.\n ETEXI\n \n+#if defined(CONFIG_VIRTFS)\n+\n+ {\n+ .name = \"fsdev_iothrottle\",\n+ .args_type = \"\",\n+ .params = \"\",\n+ .help = \"show fsdev iothrottle information\",\n+ .cmd = hmp_info_fsdev_iothrottle,\n+ },\n+\n+#endif\n+\n+STEXI\n+@item info fsdev_iothrottle\n+@findex fsdev_iothrottle\n+Show fsdev device throttle info.\n+ETEXI\n+\n {\n .name = \"block-jobs\",\n .args_type = \"\",\ndiff --git a/hmp-commands.hx b/hmp-commands.hx\nindex 1941e19..aef9f79 100644\n--- a/hmp-commands.hx\n+++ b/hmp-commands.hx\n@@ -1680,6 +1680,25 @@ STEXI\n Change I/O throttle limits for a block drive to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}\n ETEXI\n \n+#if defined(CONFIG_VIRTFS)\n+\n+ {\n+ .name = \"fsdev_set_io_throttle\",\n+ .args_type = \"device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l\",\n+ .params = \"device bps bps_rd bps_wr iops iops_rd iops_wr\",\n+ .help = \"change I/O throttle limits for a fs devices\",\n+ .cmd = hmp_fsdev_set_io_throttle,\n+ },\n+\n+#endif\n+\n+STEXI\n+@item fsdev_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}\n+@findex fsdev_set_io_throttle\n+Change I/O throttle limits for a fs devices to @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}\n+ETEXI\n+\n+\n {\n .name = \"set_password\",\n .args_type = \"protocol:s,password:s,connected:s?\",\ndiff --git a/hmp.c b/hmp.c\nindex 2dbfb80..712c6a3 100644\n--- a/hmp.c\n+++ b/hmp.c\n@@ -1783,6 +1783,68 @@ void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict)\n hmp_handle_error(mon, &err);\n }\n \n+#ifdef CONFIG_VIRTFS\n+\n+void hmp_fsdev_set_io_throttle(Monitor *mon, const QDict *qdict)\n+{\n+ Error *err = NULL;\n+ IOThrottle throttle = {\n+ .has_id = true,\n+ .id = (char *) qdict_get_str(qdict, \"device\"),\n+ };\n+\n+ hmp_initialize_io_throttle(&throttle, qdict);\n+ qmp_fsdev_set_io_throttle(&throttle, &err);\n+ hmp_handle_error(mon, &err);\n+}\n+\n+static void print_fsdev_throttle_config(Monitor *mon, IOThrottle *fscfg,\n+ Error *err)\n+{\n+ monitor_printf(mon, \"%s\", fscfg->id);\n+ monitor_printf(mon, \" I/O throttling:\"\n+ \" bps=%\" PRId64\n+ \" bps_rd=%\" PRId64 \" bps_wr=%\" PRId64\n+ \" bps_max=%\" PRId64\n+ \" bps_rd_max=%\" PRId64\n+ \" bps_wr_max=%\" PRId64\n+ \" iops=%\" PRId64 \" iops_rd=%\" PRId64\n+ \" iops_wr=%\" PRId64\n+ \" iops_max=%\" PRId64\n+ \" iops_rd_max=%\" PRId64\n+ \" iops_wr_max=%\" PRId64\n+ \" iops_size=%\" PRId64\n+ \"\\n\",\n+ fscfg->bps,\n+ fscfg->bps_rd,\n+ fscfg->bps_wr,\n+ fscfg->bps_max,\n+ fscfg->bps_rd_max,\n+ fscfg->bps_wr_max,\n+ fscfg->iops,\n+ fscfg->iops_rd,\n+ fscfg->iops_wr,\n+ fscfg->iops_max,\n+ fscfg->iops_rd_max,\n+ fscfg->iops_wr_max,\n+ fscfg->iops_size);\n+ hmp_handle_error(mon, &err);\n+}\n+\n+void hmp_info_fsdev_iothrottle(Monitor *mon, const QDict *qdict)\n+{\n+ Error *err = NULL;\n+ IOThrottleList *fsdev_list, *info;\n+ fsdev_list = qmp_query_fsdev_io_throttle(&err);\n+\n+ for (info = fsdev_list; info; info = info->next) {\n+ print_fsdev_throttle_config(mon, info->value, err);\n+ }\n+ qapi_free_IOThrottleList(fsdev_list);\n+}\n+\n+#endif\n+\n void hmp_block_stream(Monitor *mon, const QDict *qdict)\n {\n Error *error = NULL;\ndiff --git a/hmp.h b/hmp.h\nindex 1ff4552..d700d7d 100644\n--- a/hmp.h\n+++ b/hmp.h\n@@ -81,6 +81,10 @@ void hmp_set_password(Monitor *mon, const QDict *qdict);\n void hmp_expire_password(Monitor *mon, const QDict *qdict);\n void hmp_eject(Monitor *mon, const QDict *qdict);\n void hmp_change(Monitor *mon, const QDict *qdict);\n+#ifdef CONFIG_VIRTFS\n+void hmp_fsdev_set_io_throttle(Monitor *mon, const QDict *qdict);\n+void hmp_info_fsdev_iothrottle(Monitor *mon, const QDict *qdict);\n+#endif\n void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict);\n void hmp_block_stream(Monitor *mon, const QDict *qdict);\n void hmp_block_job_set_speed(Monitor *mon, const QDict *qdict);\n", "prefixes": [ "v8", "5/6" ] }