From: Matthias Brugger <matthias.bgg@gmail.com>
To: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Kevin Wolf" <kwolf@redhat.com>, "Alex Bligh" <alex@alex.org.uk>,
malc <av1474@comtv.ru>,
"Liu Ping Fan" <pingfank@linux.vnet.ibm.com>,
"Andreas Färber" <afaerber@suse.de>,
"Anthony Liguori" <anthony@codemonkey.ws>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Stefan Weil" <sw@weilnetz.de>,
"Luiz Capitulino" <lcapitulino@redhat.com>
Subject: [Qemu-devel] [PATCH 3/3] Add workerthreads configuration option
Date: Sat, 2 Nov 2013 00:34:07 +0100 [thread overview]
Message-ID: <1383348847-14153-4-git-send-email-matthias.bgg@gmail.com> (raw)
In-Reply-To: <1383348847-14153-1-git-send-email-matthias.bgg@gmail.com>
This patch allows the definition which thread pool will be used by
every block device. The defintion of the workerthreads option
allows this at the command line level.
At the moment only the thread pool implementation "pool" can be chosen.
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
blockdev.c | 13 +++++++++++++
qemu-options.hx | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/blockdev.c b/blockdev.c
index b260477..8b83611 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -388,6 +388,15 @@ static DriveInfo *blockdev_init(QDict *bs_opts,
}
#endif
+ if ((buf = qemu_opt_get(opts, "workerthreads")) != NULL) {
+ if (!strcmp(buf, "pool")) {
+ /* this is the default */
+ } else {
+ error_report("invalid workerthreads option");
+ return NULL;
+ }
+ }
+
if ((buf = qemu_opt_get(opts, "format")) != NULL) {
if (is_help_option(buf)) {
error_printf("Supported formats:");
@@ -2269,6 +2278,10 @@ QemuOptsList qemu_common_drive_opts = {
.type = QEMU_OPT_STRING,
.help = "disk serial number",
},{
+ .name = "workerthreads",
+ .type = QEMU_OPT_STRING,
+ .help = "type of worker threads (pool)",
+ },{
.name = "rerror",
.type = QEMU_OPT_STRING,
.help = "read error action",
diff --git a/qemu-options.hx b/qemu-options.hx
index 5dc8b75..6f22242 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -408,7 +408,7 @@ DEF("drive", HAS_ARG, QEMU_OPTION_drive,
" [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
" [,cache=writethrough|writeback|none|directsync|unsafe][,format=f]\n"
" [,serial=s][,addr=A][,id=name][,aio=threads|native]\n"
- " [,readonly=on|off][,copy-on-read=on|off]\n"
+ " [,workerthreads=pool][,readonly=on|off][,copy-on-read=on|off]\n"
" [[,bps=b]|[[,bps_rd=r][,bps_wr=w]]]\n"
" [[,iops=i]|[[,iops_rd=r][,iops_wr=w]]]\n"
" [[,bps_max=bm]|[[,bps_rd_max=rm][,bps_wr_max=wm]]]\n"
--
1.8.1.2
next prev parent reply other threads:[~2013-11-01 23:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 23:34 [Qemu-devel] Make thread pool implementation modular Matthias Brugger
2013-11-01 23:34 ` [Qemu-devel] [PATCH 1/3] " Matthias Brugger
2013-11-01 23:34 ` [Qemu-devel] [PATCH 2/3] Block layer uses modular thread pool Matthias Brugger
2013-11-01 23:34 ` Matthias Brugger [this message]
2013-11-02 7:17 ` [Qemu-devel] Make thread pool implementation modular Stefan Weil
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=1383348847-14153-4-git-send-email-matthias.bgg@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=afaerber@suse.de \
--cc=alex@alex.org.uk \
--cc=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=av1474@comtv.ru \
--cc=ehabkost@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=pingfank@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=sw@weilnetz.de \
/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).