From patchwork Mon Aug 13 01:07:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10563813 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 2766B157B for ; Mon, 13 Aug 2018 01:10:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 166E428FA4 for ; Mon, 13 Aug 2018 01:10:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1421A2910F; Mon, 13 Aug 2018 01:10:35 +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 44E38290FC for ; Mon, 13 Aug 2018 01:10:34 +0000 (UTC) Received: from localhost ([::1]:36971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fp1NR-0001RN-EM for patchwork-qemu-devel@patchwork.kernel.org; Sun, 12 Aug 2018 21:10:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fp1Lj-0007fT-2N for qemu-devel@nongnu.org; Sun, 12 Aug 2018 21:08:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fp1Lg-0001j0-Dp for qemu-devel@nongnu.org; Sun, 12 Aug 2018 21:08:46 -0400 Received: from mail-co1nam05on0729.outbound.protection.outlook.com ([2a01:111:f400:fe50::729]:24113 helo=NAM05-CO1-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 1fp1Lg-0001hW-64; Sun, 12 Aug 2018 21:08:44 -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=0J+f19jfx6Mvmx8mi4zzZHe7Vy4ULjnXgayrhcOpOLc=; b=ZxEyiJkpa69CJDBQ/3SMU0TS6dYEd6EOrQX9FvQERVIx74ysCPkxS0jMxG0Jtk00nVlv3cZiCFzqXWc9w/YdN40nXV+rDwjP/JA3vnJ82+RAcdXzp7YzEn5WNzxe6RmdIbIKzRU9SQgM7GzXGpje5bbItGyfj5JofcqvJj4hGFo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by SN2PR07MB2621.namprd07.prod.outlook.com (2603:10b6:804:7::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.19; Mon, 13 Aug 2018 01:08:28 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Mon, 13 Aug 2018 04:07:25 +0300 Message-Id: <20180813010729.4844-5-lbloch@janustech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180813010729.4844-1-lbloch@janustech.com> References: <20180813010729.4844-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: AM3PR07CA0120.eurprd07.prod.outlook.com (2603:10a6:207:7::30) To SN2PR07MB2621.namprd07.prod.outlook.com (2603:10b6:804:7::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7bd611b3-8e4c-46b9-ab51-08d600b9489b 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:SN2PR07MB2621; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2621; 3:CCORuIBD45RMAlPh2hl+igx2LZ51BAWMFzKb5hY3lGZU+Q6cooGnJZ3F0UK/1hisqSvPWRtlmY7TEwgph1lOFqLQdKdQAhFA86N0FYn0txPkxWof2XAPLHE8C1qeegtlgzsMwcTX6RVR3kQmiv4VJtkCJI0Gey3BXobmccBK3+WtrsTav665/RCqKGN2XJ+/sQ59TtjgMTJCcycQsTEKNPhnktXrVbdwInM6SJ/Hp5pvJa33ED8gisyYl+0obDEF; 25:9k4CxXPK+xD6yIHVbV20gCldFaROVX0HZD6ecZAEdbZ+fowz3OVVhiZuwvVyB6DUiRPejY3bgBQu3+f0U+q19N+5qAidgSfBDD8Ly5QAQRq8ilQneIHq2ag4kR725P508PaLjmJ8/SlX0vQakEHzUCLxtWlLzxlFTLSO4gioXVv/tpfLe3lROtJxncSCnqhq5cu4daowj96YMJi356As8D+ZhEXiLQr0qOoNIE3jTi8qsH6LCTX22MtcEqMACvtcPsZcp9gJbRuEZ1E5HAT/owiUykQWfkXW7gQ2HkaP5bDv+8prtd5nDCb28TRLb22S7ZopLRZyzN5CpzTCvfAD5Q==; 31:cn5hU8nOP6VX5/8zSlI5Za9b/PJVqDzhQ+YXeSBw/yyZ6EUBnH8X4hf3BCu8D5hLTVWDN5+Rv7/RYKyV7vKXsAZFZqyOE96J7nH3xVOVfd+hvFnB5CIFLrzYTexIKS6o5paCBhKgUhq0GVJjzTlORMIJXhw01QIz5qk5jh9gPCT0QN2BkI6nou+MJbbgfuWHxQ9D/cBQjV3I9kZI31nnKAvAIBuzPI39FLxkN1qHV54= X-MS-TrafficTypeDiagnostic: SN2PR07MB2621: 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)(3231311)(944501410)(52105095)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(2016111802025)(20161123560045)(6043046)(6072148)(201708071742011)(7699016); SRVR:SN2PR07MB2621; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2621; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2621; 4:TFvOifUP8A/7BjY6/9Dnk3ETEGe5/HYGR/Xy2zJ83zwOBuXZf9o5skTYf4TsOl1mIS/bhSnehKBy3eK6PlMX/RszEsnkBL7jk2hdKbMA7wxqMPkC50S1WISKVdxT8/pXZswSbcjKh24YUTq6OleM7phQk2WwKwCRDW1jidUvlwSB9PR+Xq5zmi+LQW/lbmt/fqXXu66U7yf8U/7lrfoFcfxun6P9sxr2RNK35CRYCfAJQoxdq9UM6L344k7mE+8CFz3mPy3vYboaDxx0F+a/Ug== X-Forefront-PRVS: 07630F72AD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39830400003)(136003)(346002)(376002)(396003)(366004)(189003)(199004)(478600001)(105586002)(11346002)(446003)(50466002)(48376002)(8936002)(106356001)(7736002)(81166006)(305945005)(2616005)(8676002)(476003)(3846002)(68736007)(956004)(2361001)(2906002)(6116002)(1076002)(50226002)(81156014)(2351001)(36756003)(551984002)(4326008)(6486002)(97736004)(25786009)(107886003)(47776003)(54906003)(6512007)(66066001)(486006)(6506007)(386003)(316002)(14444005)(52116002)(16586007)(6666003)(26005)(53936002)(16526019)(76176011)(186003)(5660300001)(51416003)(86362001)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:SN2PR07MB2621; 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; SN2PR07MB2621; 23:JtNqeMstXIjk/sam3kkShV0yz8hClps0SwQTUZAvu?= 6swT43wBuVj1evbZS7yPQyEDqN14AfTs2WiAz7e1cYhM6p9Y6W79dgfwJiqJU0J1pybouDag80PlXKCLxUs50YbLHnqSIcwYRlqClDnZ297IkYnpFFkXCX/oMlmD718TUToqbJ+X0uBFC8FrfxfVY9+//J0TwmxE6LS73XFIH3eAKbosMbffmMHyVkBl3uEv2EjFWhEvw16LDnsT/bB2cVYH99uZwYQNwkKfd5fjcI5r2bO1aY2xaQyAhJ6K0mFdYehFijqJMUn1g4pjftMN7f7apc6bxRaj4x8ex2Wa9Ti+Wq4w3OKANfsKaV9FZrYG5lJeB51FlVnKIY4/zl7YdKAd6a7CSVivopYkmLUdSHsvCeaImC4Zqd9S0qmDBHCDMm5Tjrnk4pkdmbWUOyYSKTf1H201YqUyLnL0sJSN3+HP8jPL0bYvPdk1FJAv65nzYQNcVsyG/uU/9CzsfIz1xCCLu1i+KE89HwlmrCdyUMhi/NMr/oH46qlaEMJOaL99yZ+w9Y+WtN7GkKgWLOxc/Hr+Gp3oL9adP5kZkP/JaQPkyiyVB0OLsKABwbgrABBof5bVNBbbc+5EJmsQlrO8Qysfix8ufpNszkZptXFV4XRV04M1lSvB43wvGI4MaO62mF6n0FBNhPM6PF3PdWixId3sE+8pzqFWzz4cD3I6ceo7aDv6Q7czqE34Di+jRTDzHuf0ukhMeRObRHJ8wAKlx9n41WIaafuzcEaeXDkxpugfnrTeMK+zSB8wWTFc0BOIquzPsIA5yb0ded4jNFPbcrrU9rXnISCSwtXgfG8JkLk2D/yzSDUs8Hm8j4mf7JuMkXrXwNx25nFc3h7OWftatOjm/lBMNFcPHsxEeUdD8GjUtV/dl1/l8VgvdI39Eb2ZT5ihBCd4US+/A2ga/ePFB3QC6K7GvnKDUQhNjEf7fCWVJiPy1L9IB3eZHTYi05oQ3XXbssoaVf6x/A7p1i1luj8HreLufrps+bgwl4JjYjjiL0KJv1cr7iIbHB/iQVrdPZ0JNoq11vSxkRl1rSW0dhOfX1eA/JiQpN0/Cpy9gObfIYbvbdQAP+sBMVKH3O4/BqL6DHS3IcZsb3n78VgOtZJ0xaFcz0imUIEDcfNTTXUn8MS0vEoy9J8VxwmeLDbixqrZHPaajvnATXAFy11O7CbtmFV6lKnNyrCX+S+pboGd0Yx5OvScjKmcF0fSQ4vX8KnFhyFHibfGUP4qML8PRrNENcYGRJv2B4wf7DJYKVjGUB5T6I/uJlnpY1dFV7B0wI= X-Microsoft-Antispam-Message-Info: SJhiY0nXq2LlG1Bu4KAQn//LMlI/Vw55L507PR4f4/cEir+FjSwwoMYWMUkq3unF71JfAF7N3o08CVMKDJ1PsSWQCrjOZX8iJUdUDJAAKFiITfxPF5qFvthbekJI6QWsfNpIeSKR6vBS1QHP8wuT8I/y2MyBjIi9YVIgfaKvVmOoVd5yGQv0ojn/KGqqxi/Mt3sWNlIDY74LpLwDs0RTlO7IJpynTGa+fQEhdczLUL6+q+ZlDeW1SIlLNZmWezW6CsrNRCvJJ8JjKA72Yc9L8hkIg2OUxnCQVc85dITnqj/iXlnlgT4ox/zHuN+m+X/z4IWnvBkoa3UVjmM49kZPH8Be+51kXp709Ff+g3sqNEI= X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2621; 6:JCXEvxHgXbtzkshzp3++C3qaa8vTX1WnK8L1wIDoDx8wCgOzGvj1qO6PE6lsDN3Gf5djR8MJXtlqjpC9FFgle1y4nRYYn2tcjwz8ozfgnr5qSpj5jsyZK+3luEHMSzf9rq/JD+LCqeLoF4Zz/rm6VkfIf6EPfKLK5wZZxhUueLXAzzeNlnS1pT5A3+CrAUCkQ1AMT/RFIvmC5YvMymrUeRZ5f4NQcV50vw+XoBY/rQ4YxZavG+KZ1FyT3//eEnbpg5rkkNraNPwZ7Mxtt4lQJD6gs/Msalu25h3j7apaTYWjp2vwOEE+6R/dg8mnU/0kE4O+jG+z8Mk5Msnhzmka5s3xKHRLFMvlGvAZwPhoVsr2hH2kg4v4MKN3QzoEsCm7LvKK1DtU//XV4YNyqEF7MIw7KMsdymt35OTjVL7aQZdxEALRau+zmK1b7UfXDdaDuTyAyFHJrqBxdokvl39qfw==; 5:d6QSaYiQP6CcGACDp9GZJzsArQFEFcaN9UCuVkcbsyJGca3SbJhEsEQPwcrlU0M8ChFotxjGT19XAAQ+pJyjmwgv8t0100Lxhvl/OfTh2FuyIeKJOVx0/v8cGceu0oablM9zvWix+ZkjtcN22ENNCJMk/qqasfJKQW7CcLbtiAw=; 7:jgB9T81ZRg3z0tvAbfpvm4HJTS+86kZPCGdPWz2Oy8A4brtQNd12ecc/uQHemyXCvYpXEtcMrKQVk4JfmVhYcEdShkWaRFrRjftVrRcr3yVqTqldD5WbpUNKugbl7YlVrbfWSSYWqCBjpxeFRFc4wqy/1jgx30KP5zy/K+tXmLdDK0LByqVq5DrjnLbeNHwrj4lYQ2WwFti8InRC08LWAU4RbgnpL5DS2zJ4xYjwg6K/WyRSEQ7jsx0CqKepg2Ow SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2018 01:08:28.9271 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7bd611b3-8e4c-46b9-ab51-08d600b9489b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2621 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe50::729 Subject: [Qemu-devel] [PATCH v8 4/8] qcow2: Assign the L2 cache relatively to the image size 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 , Alberto Garcia , qemu-block@nongnu.org, Max Reitz , Leonid Bloch Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Sufficient L2 cache can noticeably improve the performance when using large images with frequent I/O. Previously, unless 'cache-size' was specified and was large enough, the L2 cache was set to a certain size without taking the virtual image size into account. Now, the L2 cache assignment is aware of the virtual size of the image, and will cover the entire image, unless the cache size needed for that is larger than a certain maximum. This maximum is set to 1 MB by default (enough to cover an 8 GB image with the default cluster size) but can be increased or decreased using the 'l2-cache-size' option. This option was previously documented as the *maximum* L2 cache size, and this patch makes it behave as such, instead of as a constant size. Also, the existing option 'cache-size' can limit the sum of both L2 and refcount caches, as previously. Signed-off-by: Leonid Bloch --- block/qcow2.c | 21 +++++++++------------ block/qcow2.h | 4 +--- docs/qcow2-cache.txt | 15 ++++++++++----- qemu-options.hx | 6 +++--- tests/qemu-iotests/137 | 1 - tests/qemu-iotests/137.out | 1 - 6 files changed, 23 insertions(+), 25 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 7949d15fc6..01c39c56c0 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -777,29 +777,35 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, uint64_t *refcount_cache_size, Error **errp) { BDRVQcow2State *s = bs->opaque; - uint64_t combined_cache_size; + uint64_t combined_cache_size, l2_cache_max_setting; bool l2_cache_size_set, refcount_cache_size_set, combined_cache_size_set; int min_refcount_cache = MIN_REFCOUNT_CACHE_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); 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); 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); - *l2_cache_size = qemu_opt_get_size(opts, QCOW2_OPT_L2_CACHE_SIZE, 0); + l2_cache_max_setting = qemu_opt_get_size(opts, QCOW2_OPT_L2_CACHE_SIZE, + DEFAULT_L2_CACHE_MAX_SIZE); *refcount_cache_size = qemu_opt_get_size(opts, QCOW2_OPT_REFCOUNT_CACHE_SIZE, 0); *l2_cache_entry_size = qemu_opt_get_size( opts, QCOW2_OPT_L2_CACHE_ENTRY_SIZE, s->cluster_size); + *l2_cache_size = MIN(max_l2_cache, l2_cache_max_setting); + 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 " and " QCOW2_OPT_REFCOUNT_CACHE_SIZE " may not be set " "at the same time"); return; - } else if (*l2_cache_size > combined_cache_size) { + } else if (l2_cache_size_set && + (l2_cache_max_setting > combined_cache_size)) { error_setg(errp, QCOW2_OPT_L2_CACHE_SIZE " may not exceed " QCOW2_OPT_CACHE_SIZE); return; @@ -814,9 +820,6 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, } 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) { @@ -828,12 +831,6 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, *l2_cache_size = combined_cache_size - *refcount_cache_size; } } - } else { - if (!l2_cache_size_set) { - *l2_cache_size = MAX(DEFAULT_L2_CACHE_SIZE, - (uint64_t)DEFAULT_L2_CACHE_CLUSTERS - * s->cluster_size); - } } /* l2_cache_size and refcount_cache_size are ensured to have at least * their minimum values in qcow2_update_options_prepare() */ diff --git a/block/qcow2.h b/block/qcow2.h index 39e1b279f8..d917b5f577 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -74,9 +74,7 @@ /* Must be at least 4 to cover all cases of refcount table growth */ #define MIN_REFCOUNT_CACHE_SIZE 4 /* clusters */ -/* Whichever is more */ -#define DEFAULT_L2_CACHE_CLUSTERS 8 /* clusters */ -#define DEFAULT_L2_CACHE_SIZE (1 * MiB) +#define DEFAULT_L2_CACHE_MAX_SIZE (1 * MiB) #define DEFAULT_CLUSTER_SIZE (64 * KiB) diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index 2326db01b9..e89e74b372 100644 --- a/docs/qcow2-cache.txt +++ b/docs/qcow2-cache.txt @@ -124,8 +124,12 @@ There are a few things that need to be taken into account: - Both caches must have a size that is a multiple of the cluster size (or the cache entry size: see "Using smaller cache sizes" below). - - The default L2 cache size is 8 clusters or 1MB (whichever is more), - and the minimum is 2 clusters (or 2 cache entries, see below). + - The maximum L2 cache size is 1 MB by default (enough for full coverage + of 8 GB images, with the default cluster size). This value can be + modified using the "l2-cache-size" option. QEMU will not use more memory + than needed to hold all of the image's L2 tables, regardless of this max. + value. The minimal L2 cache size is 2 clusters (or 2 cache entries, see + below). - The default (and minimum) refcount cache size is 4 clusters. @@ -183,9 +187,10 @@ Some things to take into account: always uses the cluster size as the entry size. - If the L2 cache is big enough to hold all of the image's L2 tables - (as explained in the "Choosing the right cache sizes" section - earlier in this document) then none of this is necessary and you - can omit the "l2-cache-entry-size" parameter altogether. + (as explained in the "Choosing the right cache sizes" and "How to + configure the cache sizes" sections in this document) then none of + this is necessary and you can omit the "l2-cache-entry-size" + parameter altogether. Reducing the memory usage diff --git a/qemu-options.hx b/qemu-options.hx index f6804758d3..22e8e2d113 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -756,9 +756,9 @@ 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 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) +(default: if cache-size is not specified - 1M; otherwise, as large as possible +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 diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137 index 87965625d8..e3fb078588 100755 --- a/tests/qemu-iotests/137 +++ b/tests/qemu-iotests/137 @@ -109,7 +109,6 @@ $QEMU_IO \ -c "reopen -o cache-size=1M,l2-cache-size=64k,refcount-cache-size=64k" \ -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" \ -c "reopen -o l2-cache-entry-size=33k" \ -c "reopen -o l2-cache-entry-size=128k" \ -c "reopen -o refcount-cache-size=256T" \ diff --git a/tests/qemu-iotests/137.out b/tests/qemu-iotests/137.out index 6a2ffc71fd..70f245ae7a 100644 --- a/tests/qemu-iotests/137.out +++ b/tests/qemu-iotests/137.out @@ -19,7 +19,6 @@ Parameter 'lazy-refcounts' expects 'on' or 'off' 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 L2 cache entry size must be a power of two between 512 and the cluster size (65536) L2 cache entry size must be a power of two between 512 and the cluster size (65536) Refcount cache size too big