Received: from eggs.gnu.org ([2001:4830:134:3::10]:53302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdHPK-0001Xm-Ep for qemu-devel@nongnu.org; Mon, 04 Nov 2013 05:29:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdHPB-0004bO-WC for qemu-devel@nongnu.org; Mon, 04 Nov 2013 05:29:18 -0500 Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]:48198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdHPB-0004bI-QF for qemu-devel@nongnu.org; Mon, 04 Nov 2013 05:29:09 -0500 Received: by mail-we0-f173.google.com with SMTP id u57so1876830wes.32 for ; Mon, 04 Nov 2013 02:29:09 -0800 (PST) From: Matthias Brugger Date: Mon, 4 Nov 2013 11:28:44 +0100 Message-Id: <1383560924-15788-4-git-send-email-matthias.bgg@gmail.com> In-Reply-To: <1383560924-15788-1-git-send-email-matthias.bgg@gmail.com> References: <1383560924-15788-1-git-send-email-matthias.bgg@gmail.com> Subject: [Qemu-devel] [PATCH v2 3/3] Add workerthreads configuration option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Paolo Bonzini , Stefan Hajnoczi , Kevin Wolf , Alex Bligh , malc , Liu Ping Fan , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori , Eduardo Habkost , Markus Armbruster , Michael Tokarev , Matthias Brugger , Stefan Weil , Luiz Capitulino , Asias He , Jeff Cody This patch allows to choose at the command line level which thread pool implementation will be used by every block device. Signed-off-by: Matthias Brugger --- blockdev.c | 13 +++++++++++++ qemu-options.hx | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index b260477..a16cc9a 100644 --- a/blockdev.c +++ b/blockdev.c @@ -387,6 +387,15 @@ static DriveInfo *blockdev_init(QDict *bs_opts, } } #endif + buf = qemu_opt_get(opts, "workerthreads"); + if (buf != 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)) { @@ -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