From patchwork Tue Jul 24 17:02:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10542715 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 D6A9617FD for ; Tue, 24 Jul 2018 17:04:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0E4E28C6C for ; Tue, 24 Jul 2018 17:04:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B499D28CBB; Tue, 24 Jul 2018 17:04:43 +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 BAA5728C6C for ; Tue, 24 Jul 2018 17:04:42 +0000 (UTC) Received: from localhost ([::1]:41594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi0jq-00024i-1V for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 13:04:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi0iP-00019R-W3 for qemu-devel@nongnu.org; Tue, 24 Jul 2018 13:03:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi0iM-0004vM-B7 for qemu-devel@nongnu.org; Tue, 24 Jul 2018 13:03:14 -0400 Received: from mail-co1nam05on0731.outbound.protection.outlook.com ([2a01:111:f400:fe50::731]:7191 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 1fi0iM-0004rL-2Y; Tue, 24 Jul 2018 13:03:10 -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=rr16I4yZb5OFzUT6AabjZB19PAZLD3q7kHis9HBXDio=; b=B+9a4WDCsIn3hAWI4E6tn5Eqju6nF0wccIaX1Wz1keh+Q5/pj45jJBFo1SuglCvcrTmWVhdtAyVaAfvtmwF66oSrhk8fdAXgvnGpR1LQ9Np2SzI+VHuse8TVoPFU76KPj20CAuGcuq7pzQqtnQWzrQTlZUowu2NEqy+BZ0OZUSM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by CO2PR07MB2615.namprd07.prod.outlook.com (2603:10b6:102:14::10) 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 17:02:47 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 20:02:16 +0300 Message-Id: <20180724170217.10247-2-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724170217.10247-1-lbloch@janustech.com> References: <20180724170217.10247-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: VI1PR0501CA0029.eurprd05.prod.outlook.com (2603:10a6:800:60::15) To CO2PR07MB2615.namprd07.prod.outlook.com (2603:10b6:102:14::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 77ccb235-315b-48e8-9f19-08d5f187495f 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:CO2PR07MB2615; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2615; 3:REDKDlxaTYImE2HFvQrt+YLACy9AU1b1ce2HzTNlmUd+po9NFBbzQtqT7Yv1rFGvwObeco0+PT40IqhvZoklz6vmrVq6bhPPtb1pD1LtJFmGcIcxXJUDfJSHrQugVH/srp4fM6sdc3WINwDhpJnH4TlMsElvUjhMPVFnOnLrvCq8dEBu4LZSBa0915Sh4r6rSQRkf1W/btrW+v0dURzVaXcdb9kYsQlu2yPLeAW+oAv39+fHSIlW6BhUAQTX6TJT; 25:3RBRfFwfrMP+a3XnZgBto60qt8QpuSMmcriagD+1SyhjDyxUcZBeGU0d2KSxxjj0H8eFAQi5JCTPuumF/RpfdZ09Rw6C6acMThi5MAlBI7zaShvpPu4A+T228hmmDg8x9NH1bwVhEshVXjFmVp9pqOeWNtEpF2i/n0zujEkTj7xxkkjsZeG4cWUS/KXuQfdfmOFAo8CMH08yU3dfmYzA1l00alHDkHs4A0N1DsJsIj4FOqMQO+TE4t8L3tlHM07Fvmx6dUXF/YUft9Q9NgLPkheKWAKcoMcDSwN00VZWp5UQorZvCYbCDYqZ8srMAk7DHeurpKJj3ZLWwwRtXXT2OQ==; 31:8+2bx60CXWgO0zZyFgynsyi9mwPU0BLzhQjHQYq+tY8u23cnBB094ZlJ/wkUEAf+b+x5WgvCX0DZV+h7RMx5N2Y6BMoJTGu2FUjj5uF9p5I684L+xjUENdMExB31DTGl94Wz5qL6/Jv562RLJsiMhwVRYH5B9BY3UFdBG75hIEo2rjsP5n7jCoVUeoiBe5quRtEPRB5sUZE3/ymO1F0SLWl52iFyCDbVTDGwm5jXsDI= X-MS-TrafficTypeDiagnostic: CO2PR07MB2615: 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)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(2016111802025)(6043046)(6072148)(201708071742011)(7699016); SRVR:CO2PR07MB2615; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2615; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2615; 4:2L2n5t1nrAhSq+nrc+ZLzPvVtagP/2n29RZ+CSYhjhSxHfCO2o2KlW4Fq8bTRMRllKyv3e6IgTWs6yD7nQmy+BasxM6dbaZFwgINhAXnVqGMo//dEWVeFPTxxNH8s+E2IRa3DGQqXuctKe+rP4KwljPl6wKeLsEIdT5MsNY4D2omJztrDjX1wEaZDKoWRm1FFLM9UX1OLruq8PVzrLiP2u46j5T5vhxjKTSn0DGc9zXfHEwPrcc+IcfI7QDSCz/arV4bV9nN/gNMEjKxzOD64A== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(136003)(346002)(376002)(39830400003)(396003)(189003)(199004)(50226002)(2616005)(6506007)(68736007)(6666003)(11346002)(446003)(26005)(2361001)(25786009)(8936002)(6916009)(956004)(16586007)(1076002)(107886003)(8676002)(2906002)(81156014)(54906003)(6116002)(3846002)(6512007)(6486002)(5660300001)(476003)(4326008)(486006)(478600001)(81166006)(66066001)(36756003)(16526019)(14444005)(48376002)(47776003)(50466002)(105586002)(316002)(2351001)(97736004)(106356001)(386003)(51416003)(76176011)(53936002)(52116002)(7736002)(575784001)(305945005)(86362001)(186003); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR07MB2615; 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; CO2PR07MB2615; 23:hChiasCbfAvLo5W/Ub0uWBqUIHigI8AqotWLEiNoQ?= tQbjnDsaUzZbgNu9lJ/9/KCthn4qVCLJ0EoCZJZ9ZaoHWSggwGEQv5mfLhl8qwCzM24UotQL5a+wp11qKvhQzP44xxX8mviPgg+ncMWuxt/mJoFHGlnAPrRbzgyWKfYpkcgerSORO7esebRXs5ZffMtrbSKnM5/NcMBdwKo/SFfoRwEj5jONK9snxqe78Ha/neqAHtecVvcUMpMie2AkKoDV45GXihxGX4npjuNxxAzJU2kywWYIEZn8nxTf9Mqtecrt6D36TmiukwLYRSF7C9zEeQFayAtjluD/f1//V/pE48nBNpdy6vMVUQmMVJLFN4m06pAgBElEaQtAXla4WEBje9HThWmVeLNc5O3G1PYvQmDGVCzwD26f7Ci+OFxl7sw9mmIs2jLO3rOz9aj1lHuuP6xR7S4+ZtaFHHfSl3gnaRKxisPzICJ254lpQs03VfeA0lpo7Llrsut3vPwbM7c/hHj/KzCESkNV9FHr27RyMjaQQJIZcYBYW2GE81H9xQxUP5rlZQ7mVNinamd0ez+jNi4fA2N3rB9EjkpPK7+uZWZVPgDTWXqIj9fW6Ylru71JutOgdHXwMlJ/Bb7oQ2CTv7p2f0FnVd1pWt3JqLwDujXRUjDOk7FwTn6yy775Mosh3i5TwuawdpuPGTwDGfYWcToEULoVKp4IfrxWmSzyg6xzlM/N/jlJwtp0GNUVuVrGtVQmKyrkMZeXTH3tdyAg9lxkMRIFRKKTWyOHzrH1KdLeElpc4B4EDcGx/4fgQjsabXwUCqo5iDlqq2z7ODfUH4xjj8kYsAMARAG9ZvXUXdrQsHW1rWB1Lzhp66uFcIstpN5FF6zBSf8FYkKjTKr5lCG/yGOV2nnzUnOboK5k1np+S8WRQD3RXMCd2Ysg4v7iRyW14X1yRxLoZqNxdthMUCJObk/mH2LqvvHUXmWDhhbzipEj1l7XwOF2XvA4O5ORQ56tu+YdXSTyMyURFTkGO0jAcmOj1Uh+jHsKb3xwqGR1gX89jwUJdS95J/qia4iKQ6rz7Nrks/KaFu6/j9QE1E3n+uZ+CPGnrAKbp62OkEyqM//JKpV2fgunpCZ0X8WXO12sOS7VtYqATmrCxbyRHV/PeeuC93oGtS1OFDJbqrN/B4AtL+w+30EV4lDD5wHcQSP7WRDMUBkXPSNfnW43GNuUfRt9+M/bxvQXFF2tBpX1jlG3I7EE3TZb4iKajkceJNSjSA6wAUfHK0gSD7fPlrb534CTbo2xhLgCXi4W8L2u9QxBeys+X5Gw7KLzV8= X-Microsoft-Antispam-Message-Info: agJh5N9hBmN7MPex1FkCSdzMeumE5xbyB/Gbh4pzG/oChJmGu3nlVYvMlZYracs/bA3yuMPHsZHbCK/FyXqD8UpTIvf7czqoXAz2Wtq5Lw/Kr57/WNy9IK8ilQ5Vi6F0SAqAVcQ+MPnN9lGZYJ/Cw/H/DMC/Mfu5LrZXpMgZbMjbUtN0IUqNMDo90JitcbyR5cqrA5UuLGueByJupCsA6xEF1PUAFpdYbLpABYF83ZOqBzg4xT+jYqcvlI2maN/0Ze3F5AEdszewWfM2OW57b4Ic1Ioc4bNaftdK8giQSuNSU6SN/TcdSNDGzrz6nVbBWR8nF8EyA9/GkEbwmevM0uP57DFCam/KxKorS9Czz+U= X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2615; 6:0cXRcbuEY9SqwJmrH/l+pmBv05st1X3qeV1zH2kXkmAUfIMEYSaRLvFcySLC9sI/aPQs4VqvDG5o1PwrAwTMrrJchlSUtFsHCbP5PHLIclr+xhSapnN/uEMCZFyTA1MHZ7H6rGXN43j/qNA2/uFUFk2oUug9ewTcd3m0nZUL/f9dwPg9ppSTB/f0l9ZHRNXnG4BMJOHaioAmnVYcK8V+elLUYNrJP+1T8SGc/MV8i4wxuCOZbUjqmxRNRxK5hd5evIjo59xkkZB/fG0Nx6aj54hGoDFXwgg35xTZ2HzrMJPJwQray68zA8UkhJTs2XBYyRiRriwODFSxUBqzYD/WnM9svDxfbZg6uwDBGrb+WfA5L8V37QmFU/rBciGp59tkINgaQuweZgYSLEUscrZ5on8r7lRJNy0+4FXJm7tU+ZvRqojDrv09qzvXJ/Eq0yAGmwJmJLHF9mLiVHcPyRyCPg==; 5:bPDzVWddaOOMgGnxJ7E80U7NZGNnJCBvx9QXDn4dCc6QCrVXSEqJCOyMOzRZmeSBgID/nu6De3+Y173jRdYzuu5I5EMu93M0vtfZ1aJJ5fy3u92Z3V/b0O9IaxMC5yIUwIxzeMqr9seiUykbSoBFi+aI/IwTmNpT1BmkufJh+uo=; 7:UiCeUZkg1TJdlIWq3EP/Wg0F8dv/NiBF+c8Y0d8LFVvmZkkJz6B0egMaDzq2GGPdZ+5MoZFV55sF0kr0XMg9htot3q6F25oH6Pux/ataFkmj+zZQkiEy/XrBGaCOgmHRkDWyzFOvDrx6WJkJ6rt2ALeKFALZ4brdORNkS6+lKVGo55MxYcvSZvtWT8wMdKzY4VaGcu8IpDw+P/c/iE2GddY4FoZSPkrv5pMieXr9hjjULPhGv18Yb0AANX8CcPj8 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 17:02:47.0453 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77ccb235-315b-48e8-9f19-08d5f187495f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2615 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe50::731 Subject: [Qemu-devel] [PATCH v2 1/2] 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. Additionally, the documentation for the related options is fixed, and a small grammar fix is made in the immediate proximity of the changes. Signed-off-by: Leonid Bloch --- block/qcow2.c | 37 +++++++++++++++++++++++++++++-------- block/qcow2.h | 1 + qapi/block-core.json | 8 +++++++- qemu-options.hx | 19 +++++++++++++++---- tests/qemu-iotests/103 | 6 ++++++ tests/qemu-iotests/103.out | 4 +++- tests/qemu-iotests/137 | 2 ++ tests/qemu-iotests/137.out | 4 +++- 8 files changed, 66 insertions(+), 15 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 6162ed8be2..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,15 +800,32 @@ 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 " 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 " - 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 b1bf0f485f..fec083f50e 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -752,15 +752,26 @@ 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 in bytes (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 +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: 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. 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 bd45d3875a..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: cache-size, l2-cache-size and refcount-cache-size may not be set the same time +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 96724a6c33..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' -cache-size, l2-cache-size and refcount-cache-size may not be set the same time +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 17:02:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10542713 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 CD8B6184F for ; Tue, 24 Jul 2018 17:04:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6AF128A53 for ; Tue, 24 Jul 2018 17:04:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA73428CBB; Tue, 24 Jul 2018 17:04:41 +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 3576428A53 for ; Tue, 24 Jul 2018 17:04:41 +0000 (UTC) Received: from localhost ([::1]:41593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi0jo-00023C-DA for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 13:04:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi0iQ-00019T-0y for qemu-devel@nongnu.org; Tue, 24 Jul 2018 13:03:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi0iM-0004w5-O3 for qemu-devel@nongnu.org; Tue, 24 Jul 2018 13:03:14 -0400 Received: from mail-co1nam05on0731.outbound.protection.outlook.com ([2a01:111:f400:fe50::731]:7191 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 1fi0iM-0004rL-Fa; Tue, 24 Jul 2018 13:03:10 -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=6f+/tN1Lt3MuuccllODTrjdSgP62VU2ZpACRNHjQCY8=; b=K3o460HYnViAyKLOXb9W16PBE8LeIZFzNL80Q/pLsNWqfRlftZxNnfp9EXkPj03POucGiT6MbRcF7ccqk2znxnEG99W+vVAHHnmMJXAa46baRqNMU8jqwdNp+zHZ8SIlaCMrdd2RxSfr9RilvjQx2b/1BdOfWbTSvtd1K7+cSSc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by CO2PR07MB2615.namprd07.prod.outlook.com (2603:10b6:102:14::10) 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 17:02:50 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 20:02:17 +0300 Message-Id: <20180724170217.10247-3-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724170217.10247-1-lbloch@janustech.com> References: <20180724170217.10247-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: VI1PR0501CA0029.eurprd05.prod.outlook.com (2603:10a6:800:60::15) To CO2PR07MB2615.namprd07.prod.outlook.com (2603:10b6:102:14::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88d59645-7acf-4e50-d011-08d5f1874b23 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:CO2PR07MB2615; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2615; 3:aXD54kpS1OgWZj3szF2eX8BjBgTsK7WSzn7dnyiXV96qy1o++pQOEorzy1SFqfoR4tYKuUs6dt1dtmEHoxaSXpXaX2oMeKbR0ziGTiIFM0xOg8YthEZBYZIk4Q6EhLFLqMxgpKg1MClXrNV3iO2azBC02xIipdlkbeBpY+aaPtk4KogmcgIWCl8Cu7RfvO07W/91H7dDzkPVwwXwkRWkROCagESJjHp0vE3zV5T+Ukb+tMBbJeb4nlpyokiLqJu3; 25:kZheOTHwPL7vnQJhWt3+tpqTyiIwHFVonzMZTh7CBrpp9kr3OJikN7zHMYnfCVqeByIr1mEDkD0cCglZxI6KyI/vnyJEULecE+amTzQdCIGEkKl9ZE5eu9tY2pB33Cn7pkGJaFk5LkGWPSUhJa/uIopXZUXRrz0KUtXPEriGsVygKV7avZ2Xt619svr9ohc619nVmQAkXBZANMx1cX5HUO8i8+ZaT/d/cawWNRXX5tysHLH8AIAnLcpv4CfW7lHn5rFmAQly0WTIl6dQhsmAMPRtl65g5j9zBbw3nXq2ZF6j30CNlqesJ8SOrE8y16OZtkxHv9YoP0XxQ8p/zqUnPQ==; 31:8yjXo9240V1ArXNLcQ9ZLfQ3f96IyUhvMgpjfytTL3UuAftaobvuLr8sauYNm4uOmYX+gMVBL7+Q5BArLCVXYg+GkdVXc7AgzrMbgaaWVAWwaZuC/Dv9sYQ1QqBGbRP8jJaA4dd/yjOAaZ5PMfi3Ldo4rx87kzZA1CGr4nckPmQfHN10hklKAKKAuvb5UnIA5T1Oz4SvjdyD0rqDs99acwr26C+FMtphRxZbiZI/5t8= X-MS-TrafficTypeDiagnostic: CO2PR07MB2615: 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)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(2016111802025)(6043046)(6072148)(201708071742011)(7699016); SRVR:CO2PR07MB2615; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2615; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2615; 4:hkcImvrAm/5AVBzGH11jtuns7V+lphCo47AloWadzYbvjmlw6MjoE6Yswmaj74mF7Gle4iwDevFaPzEq9Mm2toy+wpXSQKGMH5wF0ezef6kYVwl08klQRJRXc4X/l+2lwrAwDQtXQGQsEZxjEPB8wRk1pYAnhbUgJ12mwPfnKkheUGKBGmGnnw0QjnZ4oDCV1t7G8OZihjR7QhzBXm3XTJx6dChMEoPJbToV/RcXrS0gEJeszX37tyRyJ1SveUIoq2t3e+Ms+BHbk589R75xUA== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(136003)(346002)(376002)(39830400003)(396003)(189003)(199004)(50226002)(2616005)(6506007)(68736007)(6666003)(11346002)(446003)(26005)(2361001)(25786009)(8936002)(6916009)(956004)(16586007)(1076002)(107886003)(8676002)(2906002)(81156014)(54906003)(6116002)(3846002)(6512007)(6486002)(5660300001)(476003)(4326008)(486006)(478600001)(81166006)(66066001)(36756003)(16526019)(14444005)(48376002)(47776003)(50466002)(105586002)(316002)(2351001)(97736004)(106356001)(386003)(51416003)(76176011)(53936002)(52116002)(7736002)(305945005)(86362001)(186003); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR07MB2615; 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; CO2PR07MB2615; 23:H2nmnUMu4fQGzhKjPMKcL2MtNa3YkqlVqpIA3V/eB?= YQj1xNfgQ1AgTkfdxuOOw3IKDlq82MjZYltUvEV/6ZxYfCYcp8gBuQNYv73hNiCFWDeIFZGvFCCpmHRIcGUzax8rFPle6zCZoFK4IKillAuxwS8LUmQA/ge17AbTPYu0o8cXhR7DXn5Azf7gxix+4jgq8GgXLt+2VFI4QlojGvHz9/ysGsf4sS3hRdFv9WdOaevVwQv1baxxA9TPHCKVSsC9ffCzQtE9hfJ4R4WqBbFuj6tNILbQVM/F3DXXzgeUq3TN1qvmraocxkLqN1OhzIlMM5k7j616Rg9DYX76VM9StV6ehOUXggvpOwsfq4VAmY4FiZ0bjaqFtulwre6B0LosRC0PuFAO1ji/Tma//tFZ+ZM5u6AGE+qaO7wd63+8xTLXFXdPff3137FEO0TaGCoV0qubgJPqji8I0MJfQ/HU8La/dypSz02nPbWDousNuGsLnk9tFxUM31c4d39mcd8zCO3N5I6IIqks70GIGgK45NAcusdQcxpCsTnMoCtaQxmHMq9VdD7P2UCuXs0eGndMn7O8zm//1/qVlPAebUxacAHoBKcBz71V6WDBqdmsnWU8FbMByp3ZawU6UUkXmc9grt4ZETPhm0BTH+XeyJkvAM0rVxBqLcrjJHrU2qOp9xwAJQnfuZfPIJzRBJ50rfjWMR1nMCLaBAMTo/thqqNaRo5VZaW8HuJwCTfo6msLw1hIHN7hn8gAKSffNZ/0c/IhKsP7XsBaD/AGQK/2n7jDgrSjHP3SD8KJdDceNMDU6R61185Bf0h6rQlsUZ7Z2tRAHDunIXmNhKY2ZMJyGzsZUdeKVJld+rilOmG/lEKwye88Fp9fwfOr2h9pqr9MtMlgZb0az3GwQAVSvlYWJk9iAPYynCEBDsHlbf+gb4qqFydPLnUoxAHlPrQymYN0r7ocGYQqpO495rS2yJU9aO/xT1XKn6JqDzl44YssMxeI4iDsn7Dgu8qZf9kER0/K5CWLdDHRmmIcNcb+YQQo5Z2WcBSCeGyhCSSQ31B9kqi369nt5ZonQZ8daF4G2GiP5ykpJ7SyPkWTI5maD7ZtcSnH7VF8RNweMT8GYrTKRylIHXOIodNodbwpwHziae+BMHaDQkBOz5s0TH+gh1AsxNBAQr4XzCi732hp/gE1j/M7jk9LrWoWC3qvi/wiSHh8BgOgtRu8bpE9TVdoAgpY7peQngxI/PHZ7Hff/C9wPEmVdW5CWGMhFiEMXAbZGuSbm/xaKIks8Wq1i8CPztwTyfpzA== X-Microsoft-Antispam-Message-Info: CDHrjww9RnW+HEAxAlomorgq8dLOuCt+EkhSN/Lero/wiBg+/uQNaQtmmUtSevo3Cu6EDEP8YDLGZ2pWMA7kODQ7wFZ/GT5dYLptF6xAdzXP7QHghZvrtIMKTj8/9J0m3p3DAYiZq5ISPoVFlE+4UYpSSJVAQVt/JHNPSiOIzcFmCIe3AahrrZA5nwwiV8cdT4cTPqQfe3AqtSilh2UV0SGEosu6qbQZh9u6uM0tsqho1KUcYTkca2vWx5KRmLlaucMQ0/EIQCPhvgq6sYa/g031DbbNSu6kIdZeH24+wEsc7tI3hBlbx4vvPSLrRf6+6I7ErJPKdg5Ph6ymfTIn3RcCiKA6E+wuSmtiV/1APmM= X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2615; 6:+/je2V87+sHUEvV7loZv1cznz7fvBICcmMZjpnDiLWK6CWm3gzy3hqIeQLvtLwrI811KQ21oZ8IwfPuNp33QmQDB1XGwl4eWOEJFEMKJxVgR35YDJluSuJP+GJfyEm4u9RQi6IK1zR40eKPaD+TJ/8WRb3vyneIkw3Buq+nfB9o8dOONEX+fmRuvxNNGuyHAdrHr05bnBhMwPGEATX3+VZDKpPdVT/Ffe8tTyXVhQ+gIIPl6xRWEoQ5xfE7A5SRAbYCo3kWh+25nChvWEgaSVYb8U+m82Y9ClUJGeqRA8kiX4Bc7NojlGwTJjzSsZpDsFciunr1yC0CcjdJqqPN1R95C0E4cvjgMRRjb19151oGKjKyXSyJWK8iKZRHj2HWF5DXOuYb5Sn0AwJxezIsf7G+fywZbWg8PzHiQKO8mesb/bX4kBVoSQOdjeavgthqcbH/jyAJ+bkO7cS8xEZpDIw==; 5:W8iRquwRsVSwvkmH1vLllrx5h2/6QhRAuxx38DhTABey6yTUsqP70E1HvpHeFQYApjl9PwaFZT7OsZoBEvirFlwsllK0rdxNhZJIVEiu2HoqhFOAcrni1UXnwwr0A2L1+YxCcm/4rTV80vwPAJ/H4yCk7+CBWQ5ZVr1tITpnUtA=; 7:xk5SXqvj/Iuw+iGpeM5ByKdPJ2vT5PS0jd4faejrabInZoHDoEvGawAkuYcN6lvQoc0AjpwE7Xibe+YL59C6SjJpTxVQaJ5r2Gx93oE2yojYNTu0L4TKq5VL5jryt/OnZIoO1PmUR0+VRx+XFqg5y3hpsJ0MpAJN03Ye3doIvEDLi24Wf7gC7BedjSSk2QmE3EThaEPOS7wibtDjMlpTizdcomvLVrtvOp3m9ei9sNTXirKrXmO74QSaYSLcm6VZ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 17:02:50.3070 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88d59645-7acf-4e50-d011-08d5f1874b23 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2615 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe50::731 Subject: [Qemu-devel] [PATCH v2 2/2] 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 This documents the new "l2-cache-full" option, and sharpens the documentation of the related options. Signed-off-by: Leonid Bloch --- docs/qcow2-cache.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index 8a09a5cc5f..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,15 @@ 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. + 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