From patchwork Tue Jul 24 20:03:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10543165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B39249093 for ; Tue, 24 Jul 2018 20:05:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0F5D200DF for ; Tue, 24 Jul 2018 20:05:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9502A292EC; Tue, 24 Jul 2018 20:05:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 500BA200DF for ; Tue, 24 Jul 2018 20:05:48 +0000 (UTC) Received: from localhost ([::1]:42421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3Z4-0000KZ-PE for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 16:05:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3Xa-0006vP-Sz for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi3XY-0007eH-4j for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:14 -0400 Received: from mail-eopbgr730108.outbound.protection.outlook.com ([40.107.73.108]:30688 helo=NAM05-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fi3XX-0007bt-Te; Tue, 24 Jul 2018 16:04:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janustech.onmicrosoft.com; s=selector1-janustech-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fDbANzQNRT48QJOXrc6SiJTrWmBamxj5GpKbHgOllAk=; b=HrQHNhmR4rI5rwpI9DZ7/PetKBGHwBfJhW0elFzT10uj3FSuby4NKjBMyvOD+sVqutfYJlUe/2TNh38w9g5YG3MqyVpEoby4Zp2Lnna149TpZFwUDTfsV7Vrc5ScINSyJLTdN7xoHdRVnGeJYW4egKkkaK7uBQHbrhyaf/UII+M= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Tue, 24 Jul 2018 20:04:09 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 23:03:39 +0300 Message-Id: <20180724200343.13733-2-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724200343.13733-1-lbloch@janustech.com> References: <20180724200343.13733-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: AM4PR0101CA0066.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::34) To BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e3f13b65-8d92-4f9e-9e20-08d5f1a09efe X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(5600073)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 3:r4C6rvMMjQi8f8L7F0pKVWE079YXygiWX94W1UDlYAY9ZPDxRUSbnFhQtC6fwYjsUnudEx6f0D0ACQgT47eh5ZF6eFQsZihrsuPjgPd4iHz9YJfNkMkvvXOq8D8K45iD/sVogDyHm80Kb5oWI8LWe4J/5DwG42mig1thn8upCIcj0m63aQS20lyrdqHxwUL+TvS+PRqmvf6UX5tMM2g2+d2/tjZIGZEJCX2l4SfZ46iIAO7by5A4MPGeZjhkYxTQ; 25:wafn5tGyN3EA5H6TF4hqyyx3+/CWWiM27goNW+LfIb6MralB+C6x1jhEIbBwZ3h2dUL5pYnuAa/0vYTeeVvmH+myWK89LsSArcdMkF6I4d+S/tVAHXOpgtg/LSjNT0B+9rKg5mGxGzNnnaCvkm4aW4b5eY6RHOJe8tWxc8/Hj1bcOZVev2Y3SYWxKIxzffFS5YAK4ibfZQEfZaZY15MM/9DXnFzaxl7UMIm764On+5npSBw5CGeFBizUrmcKS9f0gieTe30GVdAIu9OvUyHYyAFs8+o74+9nKutQSj3UyVFp1EpEgZ+ED37lfUYjmdfqVqxJpQMPGbDWUbftv6REmQ==; 31:vrZqDMGRQNOEGclu02u1e6GLD+0IigCjZxW8db0X19R94ka2CWRDCB6M94vVhh/jevmAqgTwb0KE3yw6QfZg0fksvtZ+0DLKsVDgQ9jn2H/gT0+NM3xEQBBBNu0aEKIuuY47W5oJ/StHr2KZPDRiTSeHuyeprNE6xAEUdeVMQQUennXTtqCE8ysrfMDLNBrCLRPz7Q2Miopc5euYDBhugab3xz8S0i4K6VBx75AYguU= X-MS-TrafficTypeDiagnostic: BN3PR07MB2611: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:BN3PR07MB2611; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 4:MVQ5E6scMufzDkPAKvly/H9DB/yZa56ftDuPVsDxfkcwV10oH9lPSRg032lW/kWF24CIa0MFIr28bAEc+n3lBq0URIqO7brbxXXRnasvOadekcmCz+qDBAGmXtLWuMTdy1tWSlkrZihQmRotjnj8kbJPL1HS5683Faw/O8rQ648R2OUZD9m8H5B4ew9y6XJQ7pEqJyhsCvOUZuEN54VUo9WkTBMZQO5WZBTAaLLt59JuJJch57oNhCKpiVDRXB2T0qjN50upYjfgnssxlQzivg== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(366004)(376002)(39830400003)(136003)(396003)(189003)(199004)(486006)(2351001)(50466002)(48376002)(6486002)(107886003)(6512007)(4326008)(53936002)(25786009)(476003)(956004)(11346002)(2616005)(68736007)(6666003)(5660300001)(16526019)(105586002)(446003)(106356001)(97736004)(2906002)(305945005)(386003)(6506007)(76176011)(36756003)(8676002)(81166006)(81156014)(26005)(316002)(478600001)(52116002)(51416003)(1076002)(54906003)(50226002)(8936002)(47776003)(6916009)(3846002)(2361001)(6116002)(186003)(7736002)(86362001)(16586007)(14444005)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR07MB2611; H:Jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: janustech.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2611; 23:A77hh0T9+2g/S4E/50h4jxD/e1hPuzg9Qcx6aEK3a?= 23os0kba8P0VBCymXk6oxhLWyGnweKHb0gwVzqpXR48EtR05lN0pSWnnE5nIRO19sunFvwNOrkN8Ca/HyEValpe8OYlwL6qhuXLSE0qjGSe7LgxtxEUlNCSwlckocjRDeg91uv/3QF+rpznk+xaGQ/ADf0m2Xi5D/AM3hsBlzoctpaoxNEsTfjkLannAzgr/Czuyju6yA5Se6MS8aA5pzwjQPY/DIuPqpzC2uC+gDlwoZOUuRM18dahhsEGV5ZFT8ijLiRF+PBu7GUu0dZ+zTQ4RtUcffTi9BVDL4XC1DIuxlUsnV9VD/qxAlQvNb3pgDyNwvWhFcCxqAaIAx+Onk8XF/7CUDxw5Bx8fDhFb3EHgoFHsgGU63NMbObvHiA7CV8muTWxmCEARebf2US0c1B8jrpd2UtwVSTAcLNd03+MLtwNu2cKopiRfxJ3wxYPd/07H36USS6smeIKjeAKlE5ap0a7nad25sOKfXCSbMX+iesDIhSehwj0+BsTQmp1svp/gmGtu2GgqZmjebw5MBCQ9ziUqhhvmHc0Iq/Z5vHNLoQzIOkxY0Yzaa2wNWB6olvRe/HP2mhCeEcFKFPC0oVeKhMCf4EiZEwKCwd6rP2zfEgR0vrgjZ30g27WIJbzL5+B4wiN/lZV+THd7ufecXzzFeCGwfJF+sw+YjkuoJirXl/cGinaDSdA2Z+BPTeIr8bOXLyjyjaLREZe3kXE2yLZ6Wtg9J3ZMrf55v3ghEqkq/vU+erESnPN1ZpbNfvw7gCRQHkamOz/O7YrqWPi1imMkz3e3pjtGXqq68p75sm4sFIofEnVGvcynhQjjnsbPLyx18fZNDpNxVhGBlD3n/qx9+tAtUDGt0aquQcg9n0jvLAl8fqdnlXVHgjUJukytQsbDzSKSXeTmpVFRGaJ2EXsWAXCB8vO23R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OZb3a09sC7FUGLyXbB9NnMVKLgTq98sEx6Y4pxUVHyMRUQIYpezH4CKlwSxUtLJF+Pb1qO8R2p1xXO233+W0vxJkvlkVWfu89AHm5lHuO9yGEJOXcFShsPNTYO4X8FYYf2n9JLok3lPhVl1Yo/dw==; 5:Aa+/1TiMDwUZ1Z+wBukAMsVoYjzAmmjbN326i0IzvtsVRIwIONnJ5bOKQNy4jxjBmy6QFK/itk7R5KoHth1PuLqAACSi9E7U3OluNBb7dRCHXYpGt4U5VCs8Gmug40pO9NFJs+tUA3KfFxhyiCYl3l1Qt0Gl+HikJuhWRrwfL7E=; 7:YIVP0uaXnuPkna//c1Z08/OwgauESR/4XsTjlWDemeQW0pmOiokb/+TgakPlAy1gLYPOgMPXDa/3K+GPnkxpsPrggJUexQfHNPPRctQk3Sd4wBAUhKOIP0wc9cVgn5MD1K1SrWOiFd+9A3UXbfCqH8yrXmaIFAJJ1IXfp5vlnfsesUzsZp9cL0t3q5XOG8RpiBoQWcGTJ6I8On0uh7C/oXX4nXwcostF7V79Si3R1vqyn8HxVrjSQ4wwT8CINh+z SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 20:04:09.1277 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3f13b65-8d92-4f9e-9e20-08d5f1a09efe X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2611 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.73.108 Subject: [Qemu-devel] [PATCH v3 1/5 for-3.0] A grammar fix X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Leonid Bloch , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Leonid Bloch Reviewed-by: Eric Blake Signed-off-by: Leonid Bloch [1] --- block/qcow2.c | 2 +- tests/qemu-iotests/103.out | 2 +- tests/qemu-iotests/137.out | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 6162ed8be2..ec9e6238a0 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -797,7 +797,7 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, if (l2_cache_size_set && refcount_cache_size_set) { error_setg(errp, QCOW2_OPT_CACHE_SIZE ", " QCOW2_OPT_L2_CACHE_SIZE " and " QCOW2_OPT_REFCOUNT_CACHE_SIZE " may not be set " - "the same time"); + "at the same time"); return; } else if (*l2_cache_size > combined_cache_size) { error_setg(errp, QCOW2_OPT_L2_CACHE_SIZE " may not exceed " diff --git a/tests/qemu-iotests/103.out b/tests/qemu-iotests/103.out index bd45d3875a..ab56f03a00 100644 --- a/tests/qemu-iotests/103.out +++ b/tests/qemu-iotests/103.out @@ -5,7 +5,7 @@ wrote 65536/65536 bytes at offset 0 === Testing invalid option combinations === -can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time +can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set at the same time can't open device TEST_DIR/t.IMGFMT: l2-cache-size may not exceed cache-size can't open device TEST_DIR/t.IMGFMT: refcount-cache-size may not exceed cache-size can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time diff --git a/tests/qemu-iotests/137.out b/tests/qemu-iotests/137.out index 96724a6c33..6a2ffc71fd 100644 --- a/tests/qemu-iotests/137.out +++ b/tests/qemu-iotests/137.out @@ -16,7 +16,7 @@ read 33554432/33554432 bytes at offset 0 === Try setting some invalid values === Parameter 'lazy-refcounts' expects 'on' or 'off' -cache-size, l2-cache-size and refcount-cache-size may not be set the same time +cache-size, l2-cache-size and refcount-cache-size may not be set at the same time l2-cache-size may not exceed cache-size refcount-cache-size may not exceed cache-size L2 cache size too big From patchwork Tue Jul 24 20:03:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10543169 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4064112E for ; Tue, 24 Jul 2018 20:07:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B32BC292E8 for ; Tue, 24 Jul 2018 20:07:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7136292EC; Tue, 24 Jul 2018 20:07:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2AA2D292E8 for ; Tue, 24 Jul 2018 20:07:59 +0000 (UTC) Received: from localhost ([::1]:42433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3bC-0001mF-Co for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 16:07:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3Xe-0006wJ-3B for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi3Xa-0007hS-VE for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:18 -0400 Received: from mail-eopbgr730114.outbound.protection.outlook.com ([40.107.73.114]:31360 helo=NAM05-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fi3Xa-0007gE-MW; Tue, 24 Jul 2018 16:04:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janustech.onmicrosoft.com; s=selector1-janustech-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=28SjQ34LlAiLZ9C22aoKcizj58nle6yEI0+SKkPNZns=; b=PUy9mom2NKcsA5PpEOf/eB5sKMNhgw4BEn7ZTXsqEpglXu7i6fqEa1IMXxjED5lWssVahUG6JiXjY+4kFPdIsY82oSnXvYqBFv0qsrPy0SoQnOvjSbC7ULZCjmmkdinQaOUXaarV6b6xRx997a14HBvKnEBTKGpoD6DA+8Fu8A0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Tue, 24 Jul 2018 20:04:11 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 23:03:40 +0300 Message-Id: <20180724200343.13733-3-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724200343.13733-1-lbloch@janustech.com> References: <20180724200343.13733-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: AM4PR0101CA0066.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::34) To BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e6226e2e-e9e3-475b-c7fd-08d5f1a0a03f X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(5600073)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 3:pbPLreSMtH/TNeMsKiKeglIcJ9aiJ6ppaM7wy97SLNKEEaIswS2JpNmB5734OZX4QNXqgLRF26NZuqfULFwpDX9PM6LHaQ8FSS76X5a/bbjm4OZgX7vjUU18cfLvTYcORWKHuUK+UxXYKMMB7elPJNXCL+amFOoHUC6qo0cOLNMQd32OmbKfLVsCRM18Enjk3V6e7kpb8kKoui7L74Cy29YcNah5vVSTHmPpKzk4AgJWz2/amfiRoyPqZE5HpSsX; 25:xyyiKsrxdbwYM6GdN5mN33DzidoaHQqmCRAK7BzjyfobU5FW6+MQBCHL6uiw5l8NGsUv2L3k6hxK7V1KYI3Sh0XZvPMr/8oU1cn7ZisODHnXs3TPLFd1AHRd4mVFjadML/1c+j5HaVx1QPcCJjn9Orv/9mOJECqHeClpP7ImBY5OEno1SpsDHLN7pxGGQDx/yqy/xIiMG8MxxA3pGNQnYBQLTPLHh670ejkntPi/ilqcRJmAQdouv/1CL7WgNz7r5xxKz823t5aViU4vyoCY8O4zo+scGrgMhMMOo6HUPxQehGr0kaPsiV7uT4NRSUNPQiBas23oZ4KWNQPFJKsZFg==; 31:vUJIZZDEfnF5Dc6YwvQ6epJJvlyCqVHuEtcAuWU9L6stbCf+Tghv5A64qiLSwHBhyznT5rNRWgDLFmBJ+ysZT7q20XnGBnhddUX/Am15ZO6YV2R/ukm1fVmynz3Gnp+boUvSV65jwNcvsJ/nnwHlESarq+O7JG1wV34tFXKSXrNmX97rGLtPLhMgZ+cEmnUuubUSY64fEYwHa9QnhxOpbWnmBZZIOPcVk0vt8Bikv/4= X-MS-TrafficTypeDiagnostic: BN3PR07MB2611: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:BN3PR07MB2611; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 4:TJ58UWIHATRZrKwDgiFddHQrTWimpw6qWska4K56b7N7+glK5IUii1EUmq5m62okUZkEyu/lgn+ijofjCJzl3kLabziOHh6S5hcCLYxNHtvKkKjK2kE9J4Py40DsXtVNxzU1VqqRhlIFe6rrvIwSFgJFXc4Ew2FLqW9omjTgmaDAjPmgWw9WADoWKXGVEB3kyNlUxPse7Pd1Fs/7uTxDL7QjxGnq8A6edGNOaEJzV0+GJDhOKjmoi+mNfQn/xoDZbxSX9JWO40D2aaCZ7+noXw== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(366004)(376002)(39830400003)(136003)(396003)(189003)(199004)(486006)(2351001)(50466002)(48376002)(6486002)(107886003)(6512007)(4326008)(53936002)(25786009)(476003)(956004)(11346002)(2616005)(68736007)(6666003)(5660300001)(16526019)(105586002)(446003)(106356001)(97736004)(2906002)(305945005)(386003)(6506007)(76176011)(36756003)(8676002)(81166006)(81156014)(26005)(316002)(478600001)(52116002)(51416003)(1076002)(54906003)(50226002)(8936002)(47776003)(6916009)(3846002)(2361001)(575784001)(6116002)(186003)(7736002)(86362001)(16586007)(14444005)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR07MB2611; H:Jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: janustech.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2611; 23:ljT9okF/yHmA/zcESVrBDTZkhKeeC1d8CnzTuALBq?= KN2Z6yioO1H6XHAWuLYnInf/kwgl75sI/Vcf9uHUvqiedXHL/iLK1ed8jZ18zuVkdpqPYHZc0O9qsMV4P4V/yW/Y7IW/nVs+H72tkhJ+jzCnVefdsQWP7hybQlU45mc5nUGNdPyU4OfVc0I3O/mvl+g/3Tgw1l+uYpCU/UQIqrDyXx54ywpsE1Vif6lbKdCkDHPX+qIpiZc5FvC4AB1J0PrYpx8pvct0kqoIboI5bcoio672CM/iYy06gIYxOvcmweR1JqzL+EJk6bQvBtJP25jm70ALMJok5xoiVKAoKGhc2IPLcsOGf4qi6EeooTiURtrK7Mrj575gt+7OXmJtvHQYq+CRv4Dt/GqBaS4sqh28qXImqhBlHOMpELANMq5I/9oO7nwighSxE7Dl3oW0tf1ETBBfWMcex/9i4E156f1MhhTD1EA8LqT89/y8ScP6+BVcPPtZdU91wdZp+fIZKwTbxLtk+nwk2bsqXEsLeZ51zjNAojgTIZFtQBF/mA348suaHhctLPMfgzJ7qqXeO+/CKmvBPv2YyikJwdgWcjolubUoOSDDPoIjEajdf4BeLnkdm17uB70Yf1p3gBtt8WlwqVQcrZnJMHD6aK0nJW1rxNk8YsLV7sTXCECtzlKvBUB9d39CznxFC97+hYIpiTGLoblMLN+2mbSqWalQ2WJZllROFci0msrGGfIDJiJWy7fJ1G0rj/L/wgDW4eiC01I7fUUWmIBlvFkNq2WQsbXqb/ADJ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6U79ayhyDVGS1uB5xlyLrcGgcQCRRhY5Q18XjBv4YOU3L5p7ppIgu6vrQl/ZrAazfxUs0eipqdlmYuiX39AhfUTtMfaXn3Rz1/AxcdxcpeIQWxKy1r9IRM0OSPmxrifuRMSA5Xsx9W4rEzA0RaKgv56OMVtItIwKep5yFewD15nWMKNMsRTC4vwEMOQ2vpf1le3PepAeUk/oNhlPt/6oWdpOQZsCmyRo7TVNZ84ewbv/42nvlOqAqWIzaCNUodmL6ZoGrReYC40A35V+KfPzVgyhNj2A6sOWR5ZZQ3S4jGh3a1WCYzbMDkNO8YgyW3/MWVGqTh6Pz8MYSQUbiXLmtMUG/SyjpGWjwKX8QRA==; 5:dZKZ75hwHkhdoybRfT6HCOHKjvxoc5VPgZgIsccVxsegMWB3iDOUebZ26rIJMM+DQFP9KcKtftp2h4JHO8R7lOZUNetSMNz4Y8Pmr6q2ETLF2IBL3WUyswPuTruU2eHqsr8tErkta8IHdo22hdmUJTrEMJFVh67c7myI4baMqdE=; 7:GXRZkM/zMuMOPTsUCbQKSA1GhXvfVcQXVniEtRiLrmyqn1bTZTTpPR33t+eIcXizOYlSZ95ZuXG3z95rSt34mdiFleMCljvcn27m9DmRuU0OMpcRNYB3aNol2k/HxZeK7XfPNnFFWLb/dE5v2sgiVDxkiDx5dGm0HB0Ouuk79LmS99dFaafc11nX8Y47q+zNLsCesHxqa+tRZkxcJqi3dG8HpxQwX5mGr33xW0iJHENN8SOX8cF1eaywhJXXNFps SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 20:04:11.2465 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e6226e2e-e9e3-475b-c7fd-08d5f1a0a03f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2611 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.73.114 Subject: [Qemu-devel] [PATCH v3 2/5 for-3.0] qcow2: Options' documentation fixes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Leonid Bloch , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Leonid Bloch --- docs/qcow2-cache.txt | 3 +++ qemu-options.hx | 15 +++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index 8a09a5cc5f..9d261b7da9 100644 --- a/docs/qcow2-cache.txt +++ b/docs/qcow2-cache.txt @@ -130,6 +130,9 @@ There are a few things that need to be taken into account: memory as possible to the L2 cache before increasing the refcount cache size. +- All three "l2-cache-size", "refcount-cache-size", and "cache-size" options + can not be set simultaneously. + Unlike L2 tables, refcount blocks are not used during normal I/O but only during allocations and internal snapshots. In most cases they are accessed sequentially (even during random guest I/O) so increasing the diff --git a/qemu-options.hx b/qemu-options.hx index b1bf0f485f..ef0706c359 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -752,15 +752,22 @@ image file) @item cache-size The maximum total size of the L2 table and refcount block caches in bytes -(default: 1048576 bytes or 8 clusters, whichever is larger) @item l2-cache-size -The maximum size of the L2 table cache in bytes -(default: 4/5 of the total cache size) +The maximum size of the L2 table cache. +(default: if cache-size is not defined - 1048576 bytes or 8 clusters, +whichever is larger; if cache-size is defined and is large enough to +accommodate enough L2 cache to cover the entire virtual size of the image plus +the minimal amount of refcount cache - enough to cover the entire image; +if cache-size is defined and is not large enough - as much as possible while +leaving space for the needed refcount cache) @item refcount-cache-size The maximum size of the refcount block cache in bytes -(default: 1/5 of the total cache size) +(default: 4 times the cluster size, or if cache-size is defined and is large +enough to accommodate enough L2 cache to cover the entire virtual size of the +image plus the minimal amount of refcount cache - the part of cache-size which +is left after allocating the full L2 cache) @item cache-clean-interval Clean unused entries in the L2 and refcount caches. The interval is in seconds. From patchwork Tue Jul 24 20:03:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10543173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6846C112E for ; Tue, 24 Jul 2018 20:09:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5828D292E8 for ; Tue, 24 Jul 2018 20:09:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C0A22932C; Tue, 24 Jul 2018 20:09:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1E08F292E8 for ; Tue, 24 Jul 2018 20:09:44 +0000 (UTC) Received: from localhost ([::1]:42441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3ct-000324-B9 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 16:09:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3Xf-0006wP-W2 for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi3Xc-0007jF-PI for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:20 -0400 Received: from mail-eopbgr730111.outbound.protection.outlook.com ([40.107.73.111]:36057 helo=NAM05-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fi3Xc-0007iQ-EK; Tue, 24 Jul 2018 16:04:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janustech.onmicrosoft.com; s=selector1-janustech-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lltVd78H13sajxFve+kaxziGMntBkhRQikAArA7wzlw=; b=cHjKOrlG64/sNN+t4zSXhgJgyWiM8aa3EzNCBjk+hsfs41+CYmDnodQbpuIIUpk7mVrXoR+28breWAN5J7JnO/KEVqlVCBqhHDhaYnllT928/BnjXmj21+m+DLuhAq/kT3LiLaiDNRQij3QG0HPJKSnc7k49EGDD5Xt/UPqRaAU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Tue, 24 Jul 2018 20:04:13 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 23:03:41 +0300 Message-Id: <20180724200343.13733-4-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724200343.13733-1-lbloch@janustech.com> References: <20180724200343.13733-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: AM4PR0101CA0066.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::34) To BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f0dd2de0-8e5b-4032-d239-08d5f1a0a17c X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(5600073)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 3:XI2XY8H0VcjwyCQsMhuBq7PFoQgXq61ckFC0BL4B5J318/EFVVDYV2k9bWb0f1FirFb2FzFBDOBm/+TOWyl3uHqRiigT//VPl6dbBNOyWWSvMOnBR2EzZcB8xzegGvZsCpFtGciXm2q51LmhIUEfqLu+8RzUgvBU4GR5HCEn+DYo9oLPlxtuAdfLERVqlJuO8P7Z9y/xkDPtKjC8BQLBNfL5Q3NMTWBOSdVW21dKltJ8cYpfeQrNHgAbvW1PiZQ+; 25:OLn7WT/U/OugYGO74Hcj8wrkfKJfJ+YUH0bfa1+mrjwTaeaF7+lSRMWFNC4C0preq9Xm7Wipcb2F9DELIe3ziypIlDLhGDsQap9bBq7BD2u96MwYsVh/WI4ooTwiPb86fjBJy6BEpWg3ry2eLJGqfCcQZ2rHDJPxHL9l4CTxVZLxxFrMVeWS+vFc+c5HIMGVzRuZzSypVS91L6qyby6tZI1mY3vCn/tAPu9dE+3xAkFr0/sSPBBy92DmKcycI2pixvmsV8Y3GIqR8nhGJCfHVYguaO6xiy+g4xOQU4j6tzl+2cqNWJdM82EaEmQfUQl8tGPETMhXUNiVm+/l+yTMMA==; 31:ThX2XJ0xcWEaFQSFpqHZ5uzQRAOYICaUtXsBhb8lAmoV613ikp1pUU9F+3TRcX7XyCSAl4LkwSsjT30hj7eXhhBqGEqGcg44Mgn+NgLgdkamVWlZ19I3hiGl2fsrNFql7sBQfhLXS6RHcaNwkt2S79rEzT/+OTzL1ciCwMXOF0a7Qgp7KTHNi06cUsEvSF1pH4cyCFUewbH1NY0Pdc15YCRjrjOJtUlLlU5hhcC4trE= X-MS-TrafficTypeDiagnostic: BN3PR07MB2611: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:BN3PR07MB2611; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 4:dXG9xZ/Vm/1l4vHAV9iZki+nkzjQWr61Kq1DfqBx6lMVZMwW0sPL2BELqam52pSJHGhXi+iMtS5gE7FNMk8XnVtjObppJG2g/YPV4faCPxDP8j0nBnX6nNMEfQOdKhWwknmYtrI7+GXZG+5xxdp+Iwd2jUbx5gf4caCFQB7a1Brt8FIWHy08QGJYzIXZN06QFEZYYPRs2RBsd8Pf4rh/XIqXUpnu/KXWbkUqpUNiPLMl2DjkVJBm4w+/yBWxztlD1Fq9sVzEmSPnf+jHzAvsTw== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(366004)(376002)(39830400003)(136003)(396003)(189003)(199004)(486006)(2351001)(50466002)(48376002)(6486002)(107886003)(6512007)(4326008)(53936002)(25786009)(476003)(956004)(11346002)(2616005)(68736007)(6666003)(5660300001)(16526019)(105586002)(446003)(106356001)(97736004)(2906002)(305945005)(386003)(6506007)(76176011)(36756003)(8676002)(81166006)(81156014)(26005)(316002)(478600001)(52116002)(51416003)(1076002)(54906003)(50226002)(8936002)(47776003)(6916009)(3846002)(2361001)(6116002)(186003)(7736002)(86362001)(16586007)(14444005)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR07MB2611; H:Jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: janustech.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2611; 23:aQwImpbX4ZVWUWosv3jgDH3jME/aJ1aE8OjJ8Btid?= kEjVocsS/3Tdd1/0+pxbYwS/NwxwquqWhP8dytU4D89947HUWqn9/O7WPDmSwYXEZhOm5J/WYgAwnKyEymMxdLzriP8AgKchFpYKA59KRU+9R5nbM1dLJulELRCwJPcApE1BJ6b3YCMWoCCklcXGsbWCF5sFUDpOGnZmm/Xuoz/R3O0U99XvTXjZmLj9QmdUKxt97u6x0kM+4R5K/Yp0i+PpggYV9GXUHSVM7u2HH2eRNux3qrirM4dSRJ/g4ZCx7b8Q6z+VZV9WOlkM9y4e95AB/365UzKFYhoVBX7yibedt9Gq8AQXHnI0Hg2GsZRg/Y9eXjVpaAY30B6PcMVmTk3yjrsSlrRH/lcN4dCy2/3RbrmDZTBUs55TbGyHG1i8kMO2dg57q6KVdmNlP402Sv8Z7qywrJaV+r3LSqXoKCSJ9Y1KHg3dqnUAu2rvj7hAAdR6eAqiV4OPOKD0/tmFoQYyabSZtsMQM4Du8vRu8c04A9jeg11vnrbMTDqwivPAWdlwWWFUFuiGIhxuEHAYQBGnjRd9wkKYLGxN4X/tdlNx/9GuxgEGFMOXD38/6jBYx3DG4WbZEUsRI0cgu35HBcc7M5hg86yLpAvXBVKHVq/ZcKgjc1bGCPoi/jWOEh37wDDY+dFyfiSmrv+dDIrKxQSnmFjPHxxYRvcVu+kMlgUvFhEUYtApLqWtHKJANYVHi18SBh2Sw8usPFgsv0VMA3cJT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aLyNSJdWZdZaq50xweH6SA8+chP/SxBTOXF8grzgZwl5VZ8KKQcCsbJZuSPczj3nSPIwfrYRr74QRm3fSqFZDYl7uFj6wfgSVm5h5sCSgVDljRm4F/4/rtrsTnQouRh0ttX+e8qnWzHiDyZtfuASPuAXqqpwPahC4ptbCG56fwtb1OJjva5U71UorrYq91RBhi9N+7qOZaKglfZ22JojhhSH+zbtv9HEykJ1ZanoHZRw6i/ocwyIUCjME1XoYYdpdFsRXqCChmvM6wyCL3u/+vVE0QAxbhWV5oTRrVo9PMepowj/QwON6W6KBVetJj3BY9Qx/K8aR12KPiw==; 5:G/gpAApWhjPx19EJ6ieEP3vAcRKBPOEaimrxttFBWCsr1ckYjxeDCy0+1ue7micdIPjKxqPBbVsjPx0LvYgOlmCC5+4TcpbmAg7v0YG0qXQ4KBtbGI6J7sOBEx9KA/p3KS0rtL7QaXCzXUHJdWVlvfGzevdUyxP30aQaijR44tI=; 7:iuz9+7vIUAl3UNrgLWa0QZExPsqQSw36l6WDGAr3RowOVIqSjPPWex0w4OdDCdoHLDVXr+FeTU3XD8vy+pAyn4mkDta80wZJcpyRzVtGq7DpP1Ky6iTCK7YNSTgx7zz7+yYon4UQqwMS0wP7Yovmmyd/zuWIs8RA83K24R1LagKEtGVjSfHfnzZTJoV0OQrRYa8DTB1IAt7F6b/DTXZCzQG/1J5xeXqFQb+7qpXKwhzcvgQSow6CuMy1CrROOs1q SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 20:04:13.3123 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0dd2de0-8e5b-4032-d239-08d5f1a0a17c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2611 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.73.111 Subject: [Qemu-devel] [PATCH v3 3/5] qcow2: Introduce an option for sufficient L2 cache for the entire image X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Leonid Bloch , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP An option "l2-cache-full" is introduced to automatically set the qcow2 L2 cache to a sufficient value for covering the entire image. The memory overhead when using this option is not big (1 MB for each 8 GB of virtual image size with the default cluster size) and it can noticeably improve performance when using large images with frequent I/O. Previously, for this functionality the correct L2 cache size needed to be calculated manually or with a script, and then this size needed to be passed to the "l2-cache-size" option. Now it is sufficient to just pass the boolean "l2-cache-full" option. Signed-off-by: Leonid Bloch --- block/qcow2.c | 35 ++++++++++++++++++++++++++++------- block/qcow2.h | 1 + qapi/block-core.json | 8 +++++++- qemu-options.hx | 6 +++++- 4 files changed, 41 insertions(+), 9 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index ec9e6238a0..101b8b474b 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -695,6 +695,11 @@ static QemuOptsList qcow2_runtime_opts = { .type = QEMU_OPT_SIZE, .help = "Maximum L2 table cache size", }, + { + .name = QCOW2_OPT_L2_CACHE_FULL, + .type = QEMU_OPT_BOOL, + .help = "Create full coverage of the image with the L2 cache", + }, { .name = QCOW2_OPT_L2_CACHE_ENTRY_SIZE, .type = QEMU_OPT_SIZE, @@ -779,10 +784,12 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, BDRVQcow2State *s = bs->opaque; uint64_t combined_cache_size; bool l2_cache_size_set, refcount_cache_size_set, combined_cache_size_set; + bool l2_cache_full_set; int min_refcount_cache = MIN_REFCOUNT_CACHE_SIZE * s->cluster_size; combined_cache_size_set = qemu_opt_get(opts, QCOW2_OPT_CACHE_SIZE); l2_cache_size_set = qemu_opt_get(opts, QCOW2_OPT_L2_CACHE_SIZE); + l2_cache_full_set = qemu_opt_get(opts, QCOW2_OPT_L2_CACHE_FULL); refcount_cache_size_set = qemu_opt_get(opts, QCOW2_OPT_REFCOUNT_CACHE_SIZE); combined_cache_size = qemu_opt_get_size(opts, QCOW2_OPT_CACHE_SIZE, 0); @@ -793,6 +800,17 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, *l2_cache_entry_size = qemu_opt_get_size( opts, QCOW2_OPT_L2_CACHE_ENTRY_SIZE, s->cluster_size); + uint64_t virtual_disk_size = bs->total_sectors * BDRV_SECTOR_SIZE; + uint64_t max_l2_cache = virtual_disk_size / (s->cluster_size / 8); + + if (l2_cache_size_set && l2_cache_full_set) { + error_setg(errp, QCOW2_OPT_L2_CACHE_SIZE " and " + QCOW2_OPT_L2_CACHE_FULL " may not be set at the same time"); + return; + } else if (l2_cache_full_set) { + *l2_cache_size = max_l2_cache; + } + if (combined_cache_size_set) { if (l2_cache_size_set && refcount_cache_size_set) { error_setg(errp, QCOW2_OPT_CACHE_SIZE ", " QCOW2_OPT_L2_CACHE_SIZE @@ -800,8 +818,14 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, "at the same time"); return; } else if (*l2_cache_size > combined_cache_size) { - error_setg(errp, QCOW2_OPT_L2_CACHE_SIZE " may not exceed " - QCOW2_OPT_CACHE_SIZE); + if (l2_cache_full_set) { + error_setg(errp, QCOW2_OPT_CACHE_SIZE " must be greater than " + "the full L2 cache if " QCOW2_OPT_L2_CACHE_FULL + " is used"); + } else { + error_setg(errp, QCOW2_OPT_L2_CACHE_SIZE " may not exceed " + QCOW2_OPT_CACHE_SIZE); + } return; } else if (*refcount_cache_size > combined_cache_size) { error_setg(errp, QCOW2_OPT_REFCOUNT_CACHE_SIZE " may not exceed " @@ -809,14 +833,11 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, return; } - if (l2_cache_size_set) { + if (l2_cache_size_set || l2_cache_full_set) { *refcount_cache_size = combined_cache_size - *l2_cache_size; } else if (refcount_cache_size_set) { *l2_cache_size = combined_cache_size - *refcount_cache_size; } else { - uint64_t virtual_disk_size = bs->total_sectors * BDRV_SECTOR_SIZE; - uint64_t max_l2_cache = virtual_disk_size / (s->cluster_size / 8); - /* Assign as much memory as possible to the L2 cache, and * use the remainder for the refcount cache */ if (combined_cache_size >= max_l2_cache + min_refcount_cache) { @@ -829,7 +850,7 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, } } } else { - if (!l2_cache_size_set) { + if (!l2_cache_size_set && !l2_cache_full_set) { *l2_cache_size = MAX(DEFAULT_L2_CACHE_BYTE_SIZE, (uint64_t)DEFAULT_L2_CACHE_CLUSTERS * s->cluster_size); diff --git a/block/qcow2.h b/block/qcow2.h index 81b844e936..151e014bd8 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -97,6 +97,7 @@ #define QCOW2_OPT_OVERLAP_BITMAP_DIRECTORY "overlap-check.bitmap-directory" #define QCOW2_OPT_CACHE_SIZE "cache-size" #define QCOW2_OPT_L2_CACHE_SIZE "l2-cache-size" +#define QCOW2_OPT_L2_CACHE_FULL "l2-cache-full" #define QCOW2_OPT_L2_CACHE_ENTRY_SIZE "l2-cache-entry-size" #define QCOW2_OPT_REFCOUNT_CACHE_SIZE "refcount-cache-size" #define QCOW2_OPT_CACHE_CLEAN_INTERVAL "cache-clean-interval" diff --git a/qapi/block-core.json b/qapi/block-core.json index d40d5ecc3b..c584059e23 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2812,7 +2812,12 @@ # refcount block caches in bytes (since 2.2) # # @l2-cache-size: the maximum size of the L2 table cache in -# bytes (since 2.2) +# bytes (mutually exclusive with l2-cache-full) +# (since 2.2) +# +# @l2-cache-full: make the L2 table cache large enough to cover the +# entire image (mutually exclusive with l2-cache-size) +# (since 3.1) # # @l2-cache-entry-size: the size of each entry in the L2 cache in # bytes. It must be a power of two between 512 @@ -2840,6 +2845,7 @@ '*overlap-check': 'Qcow2OverlapChecks', '*cache-size': 'int', '*l2-cache-size': 'int', + '*l2-cache-full': 'bool', '*l2-cache-entry-size': 'int', '*refcount-cache-size': 'int', '*cache-clean-interval': 'int', diff --git a/qemu-options.hx b/qemu-options.hx index ef0706c359..6d417cb267 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -754,7 +754,7 @@ image file) The maximum total size of the L2 table and refcount block caches in bytes @item l2-cache-size -The maximum size of the L2 table cache. +The maximum size of the L2 table cache. (Mutually exclusive with l2-cache-full) (default: if cache-size is not defined - 1048576 bytes or 8 clusters, whichever is larger; if cache-size is defined and is large enough to accommodate enough L2 cache to cover the entire virtual size of the image plus @@ -762,6 +762,10 @@ the minimal amount of refcount cache - enough to cover the entire image; if cache-size is defined and is not large enough - as much as possible while leaving space for the needed refcount cache) +@item l2-cache-full +Make the L2 table cache large enough to cover the entire image (mutually +exclusive with l2-cache-size) (on/off; default: off) + @item refcount-cache-size The maximum size of the refcount block cache in bytes (default: 4 times the cluster size, or if cache-size is defined and is large From patchwork Tue Jul 24 20:03:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10543171 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83933112E for ; Tue, 24 Jul 2018 20:08:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 733972932A for ; Tue, 24 Jul 2018 20:08:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 672642932D; Tue, 24 Jul 2018 20:08:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C67802932A for ; Tue, 24 Jul 2018 20:08:13 +0000 (UTC) Received: from localhost ([::1]:42434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3bR-0001vI-1U for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 16:08:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3Xh-0006x4-QD for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi3Xe-0007md-Lr for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:21 -0400 Received: from mail-eopbgr730127.outbound.protection.outlook.com ([40.107.73.127]:19072 helo=NAM05-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fi3Xe-0007ka-Dm; Tue, 24 Jul 2018 16:04:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janustech.onmicrosoft.com; s=selector1-janustech-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a6cuogcFbGuQlyUYFmAgWKFEEuSrvETD+eg9WmE4fYQ=; b=fHZC53B3v3osenfN4fCndCVka65nBGaz+JRvmBmykM3wifaYNrvTtiAeRChwFiofvrrEKTK7vZIepwLt4rtQn2lVumcgBP6FcVld1W49L8t5zWIkf7I6r3O4dUTf06hR0foojFenJGt5D1hOeS51HD0vf8j/aq/0nJ6e+WC1QEQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Tue, 24 Jul 2018 20:04:15 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 23:03:42 +0300 Message-Id: <20180724200343.13733-5-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724200343.13733-1-lbloch@janustech.com> References: <20180724200343.13733-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: AM4PR0101CA0066.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::34) To BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 70911e61-99d9-4388-ffd4-08d5f1a0a2bb X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(5600073)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 3:KrB4ZMpeBt/n64z+gDuS8veHsy0yfu4OCwy6LTOhIRenBUSOBF2U+8syZMm2BuKjoFkN/VyBVCb9MoBGcdWblZV+eUUU8TvlKpyIbRFL2XABekPqB6mmgNrajEOz1mq4Nb9b6rHRdlwUhpsxw/8K4/J4Crw7hSXekJdeQILbhekB5eWB4Fik4qSsTe0p7NYYPrH6HD3aIZ7jEQf/rZT4GuqfgaDPgqaclm19GoQy1dvtysR2JLu1ZFlogxZfyg/k; 25:L9etBBPjKISNk3CWs0T9y0b7AOR/jq5U3Qh1u+0smN1DH0MSFb02OjHMvMzIcGuKdyHTbwO060XFGTvCiFQBPLun0E2WizmHIuouoIUG6g3+laNU7bqv3rW5cP/JZa0O8Uk4i+Y7yAx3HsjJaXjkaGQKYrAXkKlW8OjmYHNfox2Du+TDFKh0Ynj9hN0+uDxcbfYvIthp3rFbMGANOjlvhOgPU9sLPdTAnGIsOq9wOpjAOB1on/V0w+dSok+C4aIRrO07ETXsOBuZWZAciFs1rY+ijiBR7P5wu3l0/sJEqeJDvpJQqKDXLfcQ6Li0bhH29CfPi0JPbQidZI+gye4psg==; 31:/ZDrUfzVZl7BQOyPg0Gpeuko+3iipQrhFfKKGil55huuLcTXMOc9Po6ZIVc7dxfINlk2gI3ihLfbco1DERh6wxqBq/NOS5x4rSksMrVqRMSxJLWA1SGUwKKaIrHoTnPttzV8LWyNHs4InTuY8gcpS+hkwTCRbhjf5mmm0fK6RO/e6FiRjqhIBj2QFIBOXjmY/KHPrTLx06II6bdrxKLn3JYJplsytkvIFXdWS/XWmd8= X-MS-TrafficTypeDiagnostic: BN3PR07MB2611: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:BN3PR07MB2611; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 4:UWRSUHnXX/0dFl0MIEfNSL5J4+yxiIj0rJ/JV/sGP7GkhS7khnId5ljWhELI5JLqu8V2rRmNVe6cVgRTGuYup/kOugi3nwLj++WEcvcjVgP+k2I0aBDNrCp7b6RDepDVSGcFqvRzfwdRJ+Y0olXuHmw5B2aunau8jyeRa2p0lBtjY6U/dWT0BX4rrUbK/Jt3Sk1ZaHzPIz5R535WUjElcKIPbvCFKaHB0P+XDGy1uAgQGpwZ0587xXnLlhYqk4F4+RnzssMTjF3MnWAQ0btcwQ== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(366004)(376002)(39830400003)(136003)(396003)(189003)(199004)(486006)(2351001)(50466002)(48376002)(6486002)(107886003)(6512007)(4326008)(53936002)(25786009)(476003)(956004)(11346002)(2616005)(68736007)(6666003)(5660300001)(16526019)(105586002)(446003)(106356001)(97736004)(2906002)(305945005)(386003)(6506007)(76176011)(36756003)(8676002)(81166006)(81156014)(26005)(316002)(478600001)(52116002)(51416003)(1076002)(54906003)(50226002)(8936002)(47776003)(6916009)(3846002)(2361001)(6116002)(186003)(7736002)(86362001)(16586007)(14444005)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR07MB2611; H:Jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: janustech.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2611; 23:r1NZNKVhBtUAzja2tELRg541sAHrnqGcIxsmL1sOk?= 1zModRhm1s6ImaLnMTo3qEMGppRzkQwwNCUsRUN5V/HuHRM0e5CjVG5HgfGnaOYfC9SswHQXM4+d6wUWUoiVyBRA3ph90/jePPJezb1Nb8uAaWPuYk2qI4XXgEF4C+5ehmai+wHxxgcwgWXHWPSdE7roEUbLLS77hfdy0ErbccTwlXF3j+q4eyu2uaY2xAFLw9iltTAGcUd8u6FpuHfGyy+r3C+bmyDzlqKMcYG8CfXV3oU4Uj2XPrr2iWanYvwbyty859k7Qa6xY8BR+A58PeL45n3K9Pch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Ssu9CLc+rzc3ckeVx1VL/JAvf8JE0eo3IdhRUpn/KIQ6qrY5ZTlPx48c9sA4OObJW2tuqX5cMW5Jtu+J1y6FKipfIR4CA1pzFh2KuKdBQizouqELyObwRNZktmKmuzonst5fJA2KtVdE3U6Id0rK8AvMJ/EI SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 20:04:15.4090 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70911e61-99d9-4388-ffd4-08d5f1a0a2bb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2611 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.73.127 Subject: [Qemu-devel] [PATCH v3 4/5] iotests: Add tests for the new l2-cache-full option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Leonid Bloch , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Leonid Bloch --- tests/qemu-iotests/103 | 6 ++++++ tests/qemu-iotests/103.out | 2 ++ tests/qemu-iotests/137 | 2 ++ tests/qemu-iotests/137.out | 2 ++ 4 files changed, 12 insertions(+) diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103 index 2841318492..a2886e8569 100755 --- a/tests/qemu-iotests/103 +++ b/tests/qemu-iotests/103 @@ -52,9 +52,15 @@ echo echo '=== Testing invalid option combinations ===' echo +# l2-cache-size and l2-cache-full at the same time +$QEMU_IO -c "open -o l2-cache-full,l2-cache-size=1M $TEST_IMG" 2>&1 | + _filter_testdir | _filter_imgfmt # all sizes set at the same time $QEMU_IO -c "open -o cache-size=1.25M,l2-cache-size=1M,refcount-cache-size=0.25M $TEST_IMG" \ 2>&1 | _filter_testdir | _filter_imgfmt +# cache-size may not be smaller than the full L2 size if l2-cache-full is used +$QEMU_IO -c "open -o l2-cache-full,cache-size=6K $TEST_IMG" 2>&1 | + _filter_testdir | _filter_imgfmt # l2-cache-size may not exceed cache-size $QEMU_IO -c "open -o cache-size=1M,l2-cache-size=2M $TEST_IMG" 2>&1 \ | _filter_testdir | _filter_imgfmt diff --git a/tests/qemu-iotests/103.out b/tests/qemu-iotests/103.out index ab56f03a00..92afbff024 100644 --- a/tests/qemu-iotests/103.out +++ b/tests/qemu-iotests/103.out @@ -5,7 +5,9 @@ wrote 65536/65536 bytes at offset 0 === Testing invalid option combinations === +can't open device TEST_DIR/t.IMGFMT: l2-cache-full and l2-cache-size may not be set at the same time can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set at the same time +can't open device TEST_DIR/t.IMGFMT: cache-size must be greater than the full L2 cache if l2-cache-full is used can't open device TEST_DIR/t.IMGFMT: l2-cache-size may not exceed cache-size can't open device TEST_DIR/t.IMGFMT: refcount-cache-size may not exceed cache-size can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137 index 87965625d8..f460b5bfe1 100755 --- a/tests/qemu-iotests/137 +++ b/tests/qemu-iotests/137 @@ -106,7 +106,9 @@ echo $QEMU_IO \ -c "reopen -o lazy-refcounts=42" \ + -c "reopen -o l2-cache-full,l2-cache-size=64k" \ -c "reopen -o cache-size=1M,l2-cache-size=64k,refcount-cache-size=64k" \ + -c "reopen -o l2-cache-full,cache-size=6K" \ -c "reopen -o cache-size=1M,l2-cache-size=2M" \ -c "reopen -o cache-size=1M,refcount-cache-size=2M" \ -c "reopen -o l2-cache-size=256T" \ diff --git a/tests/qemu-iotests/137.out b/tests/qemu-iotests/137.out index 6a2ffc71fd..b15dfc391a 100644 --- a/tests/qemu-iotests/137.out +++ b/tests/qemu-iotests/137.out @@ -16,7 +16,9 @@ read 33554432/33554432 bytes at offset 0 === Try setting some invalid values === Parameter 'lazy-refcounts' expects 'on' or 'off' +l2-cache-full and l2-cache-size may not be set at the same time cache-size, l2-cache-size and refcount-cache-size may not be set at the same time +cache-size must be greater than the full L2 cache if l2-cache-full is used l2-cache-size may not exceed cache-size refcount-cache-size may not exceed cache-size L2 cache size too big From patchwork Tue Jul 24 20:03:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10543167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8485B112E for ; Tue, 24 Jul 2018 20:05:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74563200DF for ; Tue, 24 Jul 2018 20:05:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6861329086; Tue, 24 Jul 2018 20:05:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E3C80200DF for ; Tue, 24 Jul 2018 20:05:54 +0000 (UTC) Received: from localhost ([::1]:42423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3ZC-0000OV-48 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 16:05:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi3Xk-0006yY-8N for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi3Xh-0007oO-5h for qemu-devel@nongnu.org; Tue, 24 Jul 2018 16:04:24 -0400 Received: from mail-eopbgr730106.outbound.protection.outlook.com ([40.107.73.106]:59968 helo=NAM05-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fi3Xg-0007nm-Tg; Tue, 24 Jul 2018 16:04:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janustech.onmicrosoft.com; s=selector1-janustech-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b3SqkQUgnRo+O0q3FlLOQBVicXua1MxJY+C2uFylObs=; b=ACb3ymQNtungtMKhRyEGp2pU36CoC3Py+UyfbAVdZgg/coy2cWeAniwCPWe2wkxnEgQEZw+GEpRH6z2d4juqHk9YBAGl8dv4WsVMR3ZKjF1yO9djAGVZVluoNQdiz1TwTKfwNMLtXMzbBFKO2lBKXdvuoX20f/o9HZHqhMYGewI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Tue, 24 Jul 2018 20:04:17 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 23:03:43 +0300 Message-Id: <20180724200343.13733-6-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724200343.13733-1-lbloch@janustech.com> References: <20180724200343.13733-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: AM4PR0101CA0066.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::34) To BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e32fa97d-34f0-47ec-e4ef-08d5f1a0a42b X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(5600073)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 3:CCcxcPQkgk/wP5UlXNKrsaySnxX3EnRQdECy7O9asKU7H2HlZCsVRuzQ8mMbOLrNLXVB5xdOzLq0id9Zjh5GBF0iM3Ui5NZhoP9d/m9y8iFDW2Y33/VT2VxSl9VJZlfXyjj7xf8NN2SHvvlJmEqtQTcst1Alep6vchLla1TEn7/tiJzyzwghiuh4ICvLvk+Awwf7wNvHkknPkMW3sx9vXm9S9GR9r1jlNDBpz8/5NeGyQ5hNFFKPEpUTPsl4v7Jh; 25:I3DRDJmoTyWRfDQUeF3lPI+ziWOMAFnkJJfA8VXq3Sj2N5TDp7qrIK1npOeicChQ+xTEu+tPzzoiAPONXNfI1aRrEj62jFymTjN2rL7hvEs/kbb3ykAgKMC1ql4HGuVwnnIwgCWcNpqoyA8i7ftL0IcxcwfgbO/+Jk7QlnHn4CQdlDth4Fu3Vs5Kt91twv7KXE/ooxQce4c3L9Qw5GHlUtqAUJ4GMBLY6yDFvlPCij7+z488+NnFOSBCzxfD41PmiiJ1X9HvZLusixy20acwCX90pG4Zt1FWE+izu5/jtxj5uVV01dfGpirObh605ytfkiztOEzKZwqoWwJQ6kQ5yg==; 31:lzlIwfXOHYtA5kowlCsJ4w4ifvu9+09RogwWsiKZNkp492Rt3LgTTVNuFJaU8VU1bzlrNqrkIDFnsJxHW8nORDeqDY7ohWPkuzyhwvyz+Vr5umDYShWo/hwB4Q7kUC0Aj0lGbngD4GaHnDK8b1Y0d1Jdt5ETXHdA6DbWIghZIJtu+MlbEy6dFfrs+FJGmA6F0v698YpWb0OwNyHidJTDGQE+o05EI1BSORKOUrlGMVE= X-MS-TrafficTypeDiagnostic: BN3PR07MB2611: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:BN3PR07MB2611; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 4:3FCp3AAtGTWDUzHgUVThZsjes6EwkdJfxajHPmm2p4r3UvD7pWOU83cBRfEXe3vdIv0ZTpQdr4yeDXYosNt8Ipq737b5oMrz6ak90QiqymBq7hizCP9Plxwv2knOYuM7FWuS7Kpb8Gk3NGw41SjNpMJIAzbFzBfuXi1nO4kpWy1ONSzDs3cp21Ds4SopO+ZzWGKbpc6VvaW1v+PIylRHAf/4ukgkK/OPscrAAajmksTSV8U54EuB0s3EkeEA8skKADejjIbtoC3+s7OiVAj89Q== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(346002)(366004)(376002)(39830400003)(136003)(396003)(189003)(199004)(486006)(2351001)(50466002)(48376002)(6486002)(107886003)(6512007)(4326008)(53936002)(25786009)(476003)(956004)(11346002)(2616005)(68736007)(6666003)(5660300001)(16526019)(105586002)(446003)(106356001)(97736004)(2906002)(305945005)(386003)(6506007)(76176011)(36756003)(8676002)(81166006)(81156014)(26005)(316002)(478600001)(52116002)(51416003)(1076002)(54906003)(50226002)(8936002)(47776003)(6916009)(3846002)(2361001)(6116002)(186003)(7736002)(86362001)(16586007)(14444005)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR07MB2611; H:Jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: janustech.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2611; 23:g80M3vh6OX57YgqwqpTpM2jwUdX6DURJhNY25xTFu?= TDgPZobE81KwkpA0q8F/6aF24jLqR54wBdRxr14LMkCVGsJXKR5UGsfGDDhI7ZmOnAwfdARcNtFg4MSWZ0YfDd9qt6G7dERUibncishjsG70AyJzYzkQ8Y7gW2Q2KtzwVRV6r36NfAIa8KeL2m2Nhjdmg7EcMJ23Jv0xM8z757/s6AfvTT4YthCbQ4nyI8IKHYQ3g2HAhq7JK6CNdhRtcah11yviecLRy0pZ+d0slUCue1bktU6Dj37WTChb//I0GmbUBV5B2WuV3MFt11h+/QKy+VWPB11oiZCVN9lOy6yP2dfmFk/32FFyxZHQduP/6fNyGP6VKNZIwhnaFTyxj8yFNckoZq91NlkMAMMLqZH4Lb06aYpHP+JU6az4afUvr367yGwQj/9BiVlUqOtv8S7IGxkUFtoesdO3ISnx2XKEiinRiJUnP3bI0SC+1f4eXHCVMV0h8+I1rOPV7JDwDPEf+5SblAzUyRFFVb2H9DVWy47p3Dz19aCSxVrzY57Sf4rkHMMiIJbageKihEYpToaxxLma+zAvkG5t6wJ27fgqA1F61s2gH3uiTkJuv8OG8YbmFKqbYugpDgq90tZ7xPdWwoDl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; 6:kpMsc++TnVO3wob/pFA4QMCooAqsVuB/fqpEiD1bBKcNwUvKR6cEChPPnaqSRkyrAJ6ecBYDQQ11CJ2iCDIzVGzBs5SUlNcNxgK4LdXP20XUqAvAG6D+RJnjqAklZ+NBohb7hNIauNjCR01v0Kftsa9nvNZEIqIeCRZ5sle5J2mKrpYT7XZlq57O9MaOvJCd8ipLoCdxOtzmzh08Dg8et7h9TmYHti5BEs+kZsF+NZJeh8ZZ4EGFHoqIj2+5ey5Y93y3tb8JeUqWHQzqRW1bXtu7W8Mp7hg4d0Re0mICMRnGe3GBE3ZjFMzSlM5bBVE7LXuOrMLLo+PNqV5HADmVeHxDliXWMoD9qfdULb8eV/tQ5UhN4fOAUidQdeu5aL6RNIvq6GYlcQgy8umCOa/LOZUNFoyPXbmqWd+E6iW/BMgWdfOr8D5RZ5WbrPeNFRrrxcEtVgDJUA5FnS7XTad1DA==; 5:r2wuQD9tGNeA1+pvuvY2BWrhRY2xA9LPMLm3tI13NpP3amflRnQ6+pT82PuiXq8KyoYkpeDaKN0cSfUToBVB04XD2pC/H8ByPFMAPyafJihYAV68MEh23Mvuf7HaAo1Z+6N+ttX65qNn0mWLT8LOlSfoDkDH3j6uiNdBItReCMw=; 7:a0lwzCu4pVtlcDsn2VE42ycubH0qYaR+71w79Qoi/SF+1MgjTFIPMeVqbNFJQU3d/0ADh+uoMicOv68mEepV2ifbgNX6Z12ago7nkpB9Eik4nLR+umXBefDVwhyZf2ycHs2ohRrpXjs8w543Q8DfiEetBRK+oK8+iKtY4JHgxkcuD0s2na9svqroED4ZX/JKannDNq+ZFVMD2UKycthvMVDxHeywdAqs6DEb2e+riXuZSAGQlYC/jY08GM32C+Gd SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 20:04:17.8331 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e32fa97d-34f0-47ec-e4ef-08d5f1a0a42b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2611 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.73.106 Subject: [Qemu-devel] [PATCH v3 5/5] docs: Document the l2-cache-full option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Leonid Bloch , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Leonid Bloch --- docs/qcow2-cache.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index 9d261b7da9..ea61585a4b 100644 --- a/docs/qcow2-cache.txt +++ b/docs/qcow2-cache.txt @@ -110,11 +110,12 @@ How to configure the cache sizes Cache sizes can be configured using the -drive option in the command-line, or the 'blockdev-add' QMP command. -There are three options available, and all of them take bytes: +There are four options available: -"l2-cache-size": maximum size of the L2 table cache -"refcount-cache-size": maximum size of the refcount block cache -"cache-size": maximum size of both caches combined +"l2-cache-size": maximum size of the L2 table cache (bytes, K, M) +"refcount-cache-size": maximum size of the refcount block cache (bytes, K, M) +"cache-size": maximum size of both caches combined (bytes, K, M) +"l2-cache-full": make the L2 cache cover the full image (boolean) There are a few things that need to be taken into account: @@ -130,6 +131,12 @@ There are a few things that need to be taken into account: memory as possible to the L2 cache before increasing the refcount cache size. +- If "l2-cache-full" is specified, QEMU will assign enough memory + to the L2 cache to cover the entire size of the image. + +- "l2-cache-size" and "l2-cache-full" can not be set simultaneously, as + setting "l2-cache-full" already implies a specific size for the L2 cache. + - All three "l2-cache-size", "refcount-cache-size", and "cache-size" options can not be set simultaneously.