From patchwork Sun Jul 29 21:27: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: 10548319 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 7834D14BC for ; Sun, 29 Jul 2018 21:35:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67893288BC for ; Sun, 29 Jul 2018 21:35:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59A8829A8E; Sun, 29 Jul 2018 21:35:13 +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 C2EDF288BC for ; Sun, 29 Jul 2018 21:35:12 +0000 (UTC) Received: from localhost ([::1]:49708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjtLL-0007Fd-W9 for patchwork-qemu-devel@patchwork.kernel.org; Sun, 29 Jul 2018 17:35:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjtF2-00020T-8F for qemu-devel@nongnu.org; Sun, 29 Jul 2018 17:28:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fjtEz-0000Wu-Ps for qemu-devel@nongnu.org; Sun, 29 Jul 2018 17:28:40 -0400 Received: from mail-sn1nam02on0111.outbound.protection.outlook.com ([104.47.36.111]:45370 helo=NAM02-SN1-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 1fjtEz-0000W0-GA; Sun, 29 Jul 2018 17:28:37 -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=ChfTlq654w81TY23v2NQeiJH3EPGEsKSxYwKbMv45PA=; b=FdkIrPwyXprOjdyQlNevb9uO0Tn75LH4kZVsbUrwGCQoHDKHvTrMnrkH6BUAq9hgQANrK6dKc4S62UH41Pr5LROFHyR1/+51YGw2XCxB6xIiZNOw2igxd2qcUB4XtqLhZOF10iOGAFseZfQvubcYI1okM/Yvdh9d/TgU4AfNHAA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by CY1PR07MB2617.namprd07.prod.outlook.com (2a01:111:e400:c637::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Sun, 29 Jul 2018 21:28:24 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Mon, 30 Jul 2018 00:27:41 +0300 Message-Id: <20180729212744.23709-4-lbloch@janustech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180729212744.23709-1-lbloch@janustech.com> References: <20180729212744.23709-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: HE1PR06CA0138.eurprd06.prod.outlook.com (2603:10a6:7:16::25) To CY1PR07MB2617.namprd07.prod.outlook.com (2a01:111:e400:c637::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 902fb62a-e26e-4e65-1d1d-08d5f59a38ca X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(5600074)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:CY1PR07MB2617; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2617; 3:o6cIBn0wRxRlli2qETKy4ZFu0nNGNfhuRriA3BoibILkjXodPZJPTZzZIhLE/C7wGHRm8CVjzdkaOTp/fGg1lMBt9zoH+wR1+/iyjNdrp05aLcb/OxVJ5yVM2TqTy/sOjQarjdqsFTlrbZuOnggNJO/D7vK2sPrGT8di0Bi4SF2lE+Iaed8JjEXgBBqdSQzrn2XkXCTxHVHdaBcWMdUvCXVvpXLA7sWALaAkLQ8hjtev78Y2OxLln/ZmAGAOiWhb; 25:Jekaa5Vh55Ju5uv7brguLCLF8Is4lQcquVMrXhAcjtgFLKMXhXZ/riqT/yHFw/3ZAeRnj7XXfDguzwNZQVh+GrmwO6GuhWXYlCuk31KNJiNThRn1fDohCFsogtU8uZbEvyShkFx0JaUc+CRB//S7siPpqmWnYoTQVxhia3m1iZRzm5V9/fC4jTLR0kaKRQbrcVmIlNnJ+KL/yhyYlx1dK/6gO6Y63m63ARz7Pq8fuT+JVG/qdTwGCGUk8MKPSb0VOqWQ6yGWFnH4//Qz7tUaZUOHXuN1m4Ijil8tNAfKNehL6JjJ/g0qMW+CiFUW8OrtEWIam6oNuOKj87tLxaR0zg==; 31:jZKQtxwSgoR0tMmrz2ZxvRJDBI5i3rQ8RNmuleD9V5+7ea9KhJvIpCgjAsxqn33OYODPZ+jJtFEl5mUR0I7mG23INkydDqKJY53zRLZA+Ctf1XS6ymG6jtr/hraCX+AV7us/4lDz2EZERm2RMzgMfstcD5rJkfOwLPhns/de6aW569OUOOPQOC46Jlwsk66+xZDuGwfr+4shJPh9On2uwHAQscAzerRb1EDoeaJsLuE= X-MS-TrafficTypeDiagnostic: CY1PR07MB2617: 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)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(2016111802025)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(6043046)(201708071742011)(7699016); SRVR:CY1PR07MB2617; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2617; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2617; 4:pQj+5TWsRXsiSwswWhZfFvNirf2k/hZJriuiR8R4+OJJ4NQJSCP4yMVxWZ+wRZ87Uu9dKT61jjMGOfZ4YHMYMueu9HxvYTeNaYqsclI5Rot5XToXhRiiFvCsSa+MyUqgvY5YdS3ahtlGo1iHv5AsVXt66OukFY1ZnoYAtdPs/jEPOllGm4ds0yRTwgRg5vi7XiZSOFeCe9qTqKqoOzw1dJ334qC0puNzK0mXKXueBCua66i6reg6IflhO11ju9x8D+BBs4AbdaCqgVGRKfr7EA== X-Forefront-PRVS: 0748FF9A04 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(136003)(39830400003)(366004)(346002)(376002)(396003)(199004)(189003)(3846002)(6116002)(4326008)(53936002)(51416003)(316002)(107886003)(52116002)(14444005)(26005)(486006)(81156014)(81166006)(8936002)(956004)(8676002)(16526019)(7736002)(186003)(6486002)(105586002)(476003)(305945005)(2616005)(6512007)(551984002)(25786009)(478600001)(16586007)(66066001)(68736007)(47776003)(11346002)(54906003)(2906002)(2351001)(36756003)(106356001)(1076002)(76176011)(50466002)(5660300001)(6666003)(6506007)(446003)(386003)(2361001)(48376002)(97736004)(50226002)(6916009)(575784001)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR07MB2617; H:Jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: janustech.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2617; 23:gYZw4CSbJ59sI2dhTOxKxVA0seaZ0bOnnIT+MOmJd?= Ya7pmaTZs8OkX8SQf+KrmMa1sRBVCYzHGY9sCPm8XyQS+8gJmmfJk+shAvSJPs7311Uu5dmfLI2azSqrLmBE4qXTmpF7jnJBDvyvuuqQcRIUNPBAOI0rQj+yZxQxDBmIXMDA2Coi3/LeZXOpfMNU2nhwo9w7qYnMvi2G5s2a1VX84F0Vzl68/1zWuCWklFqUapCekZ8gyzDF8s7vD1IFzC5Q49Z1/sfleq/FNWIOaIoa6N2CoOh8QCsnciUoOOowWab92Eb6fhKfLkd5Mr2wdPpAYMtNdxoaa3TtJCvFyeyLj1gnP+WYNPF+3+25zC0mVDV5yH5ocCvW+Vw2Hgleb1j2Ccp+JdPRF5LmImL35mcJQQPzd5Z0SbOK1K0C2guz4MjnQBol6xQG5vmxRHwwx6uam5wq6d+I2RuKRejzxJ9hze8C+sUFyQoCHk5V6fwBT3CpDRRa1s8f3Mm6luVr1Jtqbl3yMk1HcqGXbjpggwvZRKss2fx4Ew2dTcTTcIykY4kBEITIMhT7V9oBYxOEqTs5+9vjQvzdfFud2T8pYewT/cgUVt62YNBKDiqmxqoMEa3WpaPCXTxJvz+URA4vjCWbVt/SyLlKM6ayTXkxxCZtaemV9SGvFe8qCQrQZ0sig5m0o16KC/m1VskA6NC+U+o3fvKFsgpc6WnaFpX/TzaO1IrE01fuY6c/fFZsp++Eeo4Qin6lc1jPq1uuKNwiNg3mIs4HMrrTbdsd8eVcHy8eYiwdo/gzzYlujdWrZgizPk6nUjm53STxOciKJvsNqdPzbJV1H5FloMorEllfmWmpzQ49+/LW/Uzi/RxMB1W8wLrNQGNd1ADgW5AdObIMuWNoNh1Jjav1/dFh13ibsj7PGHBwMMaNd8iFl6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BU5yZ7uBJ4bQZhgnYe56tKVlYll8MoOt82toT9gJGMzSsxlq/SZPl/NfGr5Z/o+lM0wuzw4LzIaWwt30+6cvU94O714aftCoiixnL+HDDG0uieo63bFqaye6EdN0R7wMzvI1+NmwxsiBrx7HwTom6kXNe6plWX5eJKL/eDuVH16W69p0Qr/Plp6DdaOQ/vTqv8fqAfUW3FclQVYW8R+incNBKZeq1cugeuXMGV6lgoPg==; 5:U5244kYY9QRz+c+aWFb/n1HVqDSB7DxeMPx0xS+MOnLrR5XjxoutYXesodS7LMU17SaaP3UOKl1CrYIl9+/AqoaszUfaOrp6+ID6Wv9W2fNvr67QCDIyFqOu7n31dniQ9ULvU7ZW1G9l+ICCyugiXoSGvd3i61uN+CHD5hZ/ttI=; 7:beYba3SyFK0Mcu5oO+LTAp9yrUV5lIijsn7CmpaAG2ohBBXcvlLrLmzydnWmPEQTUUFBPqradgO/gNpe+ANpZMwN1cbJNf9eskuFHSvhUqfn8YFEE4p6g/JcN0DUa4/Bzemc9S1YCP7Tv9vFCD5wNlQgVvQP+ls0ahY2stamptSVX6k1SXISQ0K9Tl0S/HyZMPriS0twKgXVYMEg2jrJsQQWT+qsdFbeLA71f7CyvNPAl4aTvW4jCErVB64aefEn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2018 21:28:24.9336 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 902fb62a-e26e-4e65-1d1d-08d5f59a38ca X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2617 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.36.111 Subject: [Qemu-devel] [PATCH 3/6 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 | 9 ++++++--- qapi/block-core.json | 6 +++--- qemu-options.hx | 15 +++++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index 8a09a5cc5f..fd9a6911cc 100644 --- a/docs/qcow2-cache.txt +++ b/docs/qcow2-cache.txt @@ -112,9 +112,9 @@ command-line, or the 'blockdev-add' QMP command. There are three options available, and all of them take bytes: -"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": maximal size of the L2 table cache +"refcount-cache-size": maximal size of the refcount block cache +"cache-size": maximal size of both caches combined There are a few things that need to be taken into account: @@ -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. + - At most two of "l2-cache-size", "refcount-cache-size", and "cache-size" + can 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/qapi/block-core.json b/qapi/block-core.json index d40d5ecc3b..22f85687df 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2808,10 +2808,10 @@ # @overlap-check: which overlap checks to perform for writes # to the image, defaults to 'cached' (since 2.2) # -# @cache-size: the maximum total size of the L2 table and +# @cache-size: the maximal total size of the L2 table and # refcount block caches in bytes (since 2.2) # -# @l2-cache-size: the maximum size of the L2 table cache in +# @l2-cache-size: the maximal size of the L2 table cache in # bytes (since 2.2) # # @l2-cache-entry-size: the size of each entry in the L2 cache in @@ -2819,7 +2819,7 @@ # and the cluster size. The default value is # the cluster size (since 2.12) # -# @refcount-cache-size: the maximum size of the refcount block cache +# @refcount-cache-size: the maximal size of the refcount block cache # in bytes (since 2.2) # # @cache-clean-interval: clean unused entries in the L2 and refcount diff --git a/qemu-options.hx b/qemu-options.hx index b1bf0f485f..18f3f87da5 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -751,16 +751,19 @@ Whether to enable the lazy refcounts feature (on/off; default is taken from the 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) +The maximal total size of the L2 table and refcount block caches in bytes +(default: the sum of l2-cache-size and refcount-cache-size) @item l2-cache-size -The maximum size of the L2 table cache in bytes -(default: 4/5 of the total cache size) +The maximal size of the L2 table cache in bytes +(default: if cache-size is not defined - 1048576 bytes or 8 clusters, whichever +is larger; otherwise, as large as possible or needed within the cache-size, +while permitting the requested or the minimal refcount cache size) @item refcount-cache-size -The maximum size of the refcount block cache in bytes -(default: 1/5 of the total cache size) +The maximal size of the refcount block cache in bytes +(default: 4 times the cluster size; or if cache-size is specified, the part of +it which is not used for the L2 cache) @item cache-clean-interval Clean unused entries in the L2 and refcount caches. The interval is in seconds.