From patchwork Tue Jul 24 12:17:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10542187 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 A5DD514BC for ; Tue, 24 Jul 2018 13:42:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66E2A289C0 for ; Tue, 24 Jul 2018 13:42:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64AD628900; Tue, 24 Jul 2018 13:42:01 +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 77DAA289F0 for ; Tue, 24 Jul 2018 13:42:00 +0000 (UTC) Received: from localhost ([::1]:40612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhxZf-0002L9-I1 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 09:41:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwGv-00052U-QI for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhwGt-0006Gg-2a for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:33 -0400 Received: from mail-eopbgr690095.outbound.protection.outlook.com ([40.107.69.95]:30824 helo=NAM04-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 1fhwGs-0006Fd-PA; Tue, 24 Jul 2018 08:18:30 -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=QOTnTEI5WY8h1EIyiPMUhFVAq6KZpXnFb3qLMCrOi3U=; b=Pv25aNvHVfXYakGuZuXkIrP6WXT/DPKSltXYIjhcmaUSmwKiVCPr5qIvuErwvdfNMlHpjmGPMkltDhBBuxARzywdvfL6EtxPs0YTnq07SoUE2OmCk69W4nFXhOl6utdMxdaOxwm3np8aYpg/D1o4bg+Tny4R1aWMkuBv0S2J+9w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Tue, 24 Jul 2018 12:18:26 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 15:17:50 +0300 Message-Id: <20180724121753.5753-2-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724121753.5753-1-lbloch@janustech.com> References: <20180724121753.5753-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: DB6PR0202CA0009.eurprd02.prod.outlook.com (2603:10a6:4:29::19) To CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a5348bcc-f2f1-457e-d6c9-08d5f15f8fc3 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:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 3:DCxzyZDqn0DHLWqHT4VffFLzgvDdNzA2C8/LZ5Dlj0ynjhSuk/bxysHrXgPM+6GX3psjYFgm8OUsShfQK8xLJ9BwRIuqs3YazQZAue9z3KHH/ajuvxBLaEWQ+P9LfVukDRDk94Ux/tO4gB+P+1Oa92ef3I/jOBtDrYyI+E/7t43M8GOlApf5FoPdPqR4uQj3ZVvPoFD50Z0msvZcUIJcFEbYRnhK/4Q09dt82ulCSjLtWg5kpXcyz/cFVeJ9jTvy; 25:o1FXBbwhQSgPrfnYMWC6KRUOb6JjvW1CKPNBHyUbwlpcpkT0grTyPd9PnFwAZQZjMHnzo7rWD8VkiYc5+ve+RsKWwyWSQj8sEWhBLGTLsj+f43oiGg4iniIv5dhwkJNU0pVUSBljglqOoBHAAVUgZoVwbFPlr/GZRQAkr9ctFjrgoatTwsUhivWkNFWfLgkmId/nSDDIs6ELEUWhPzHMnOJqlUnELw/edfuydbU6NGjr/QFeESYNrK4CY4K+ezoHddktQkhW4S8HeR6lBvosgrX5/u8ExlBL94sYaTqSdc3OgEGFb7uXtw+xUmNDNzBbUd9Pl+b1Gwd5j7VLAiskqg==; 31:ThvxYeomBkmgFFkFINxx08/8goS0Y7hK66dsoXVrYF9Je1s1btPEKc7s36Gvu+DqMEWaUOwIeFF6+o+6acwsZsNEnCjE1wJw3BO9iYSfcDK3sAEs+v+kicGWDH6W1YE+JyW8Eor7xsVTIVi/7cUPvl5LgSY6e1YMnP/rUUbYEYWqCINYjgnhnxkzvIFIM6HhKvjNdttQfqwrg5TPKDYjTSIOOjUi/8n3gH0xOH7OwVk= X-MS-TrafficTypeDiagnostic: CO2PR07MB2614: 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)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:CO2PR07MB2614; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 4:yM1NO2i2VI5G2cAOagHFb5vDwF63AXwy0Z7Bk5HmlSao3onyg8ir4jktrNYLbGfR1YKEBD6NcRbsZ7Mo6YGdetvoFYc4ZqLpceq2CzgGa1Nhz7XBCay9+gszF++C8+BwKgCTwJRKppL2lzFEd3UnYuk0t9q+p61cVvL2aDr3qpnqsSlzoKAmMdtWL1fQ7NhKoHE9lyfqSqSlh/Ka545RgnOA143k58tq0JznIofZey/gdKEoPcpT7Y1CslH1K7d0wsu8pykMENde4GOJGMlbag== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(136003)(366004)(376002)(346002)(396003)(39830400003)(199004)(189003)(6506007)(66066001)(6116002)(6666003)(86362001)(6916009)(2616005)(476003)(956004)(52116002)(47776003)(2351001)(3846002)(6512007)(478600001)(2361001)(5660300001)(316002)(106356001)(76176011)(16586007)(105586002)(50226002)(25786009)(4326008)(11346002)(54906003)(446003)(68736007)(51416003)(1076002)(7736002)(36756003)(48376002)(575784001)(53936002)(305945005)(16526019)(2906002)(186003)(8936002)(50466002)(6486002)(97736004)(26005)(14444005)(81156014)(81166006)(8676002)(486006)(386003); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR07MB2614; 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; CO2PR07MB2614; 23:a6+yU+cgxbasFtzLwUaVpWH7lgTe1nEx1WwviEE57?= p7jZ74acRxC+0GfyXP/1Riv3d5HpAppWdVhG6K59CzIdp5mCfAfD+7IRK0GB89PQa6qAMSyAOqDHI/U+UyI/2LpHCePrI2Ic8oKwy1yGmDlMQphT/XPcn/mUA/WWXsm8QxhAg0ioa2rqFW8UdbDlipF1cL3Gvc93LeSwOn7TP1X1awFytlc80vjHZNI8D15oavMO+ATzkGMnG12UPVNWmn5p5Nu1VjTWTlwNAojv3beoPmBwf3bHHwmi2hIDA1m/Jh9JUmFN733Y1D5x1F5/4dkxU5+zbHw4L2ka+BGUSlIG7bSpEFZ0AIOwoIMF98CQ2v8d0SCvz2V83qQd4tMfvFZvyl0BvJTPq6/08fvVq6keahjCu7TLFd2zuuR5c9Z+fKi3dzJ2074xw9mNZw6glIjQ7uKEQWKIKKl1vqlFZLY9kvi593Im91DJPtRE4cKDvLoTxhhii17KLNBZg2H6WDTUrrpBYvO/5By0uZpnZEm5XLOJZrmIiRuFOwBtVZbLyHHIifR+jPWA9TVkXaLoesAaFFNnnsxpo5qEcFSYGxIkHAXX/+87BQ+Pg3VlnjAOQ3ZRYxbUiUKsMG8FM7+LAJ+1XBBHzn0qqtfD6PNGeH/3MVbDk0AsSdtYN0JR9IHCsUZoUtCgS19PU2WWOtbW9iGjOMgshWcUzpH63pMhDklfKKAeRdwvHYLbY0Yp7lvWGaoP2zgeyXrPZ1XHq19DBmE1nwnXA2pTzk53IrUARNkrLcXnfrCTOoAAoWPsctsyUUJoYumZcMMnx1vpPauP6EIfK23m68gy/uhMT9zv3qMJlsq0iY2xA0T/CuvkwipKTzIoDDPEHvVwqZTntk9rvTwQU1Ooyjo4jE3/oCRUaPMbt+K18ZJwR9E2V9eAL2yM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sfh1VeDY/GZoa8j2uwtRDvMDdfAJW/Tl90ecwgJmwmHrn9GMEYwGjkM2J3DPkkD9RuEJve/Dh9rVZdqG0QaLyYtn8N6lnrqKuz9XQzb6uraecYfr+8W5BOt8ZuqokZBNTTybrZygqjhX8u4vq8MMPszGRoJA86CuTOc3TKeG8jnJBlmRFVTOE8b9+GZA==; 5:RUejl7aPZmA2habBJV0Cqni9CdgfzpggnZfU9mNs7o6BANvTmuVPfPp22kD8acVEUHM7HayDdf8WiOdBEo4UcTQoBkavpwvljEY/JFV0quGc307KTiqXBc1WUpr4GhQklTewIp9vHln6B07RZSRU1sw27/TRYWud1OpiwXmrL5E=; 7:huvzKN88ckCrfGZNaYSbTA1EfXykkxwgMyvJhk+kqMYjSFQz+gw+R62rk2EZj9N/VHmCbNYDyLJVlz60boAmJ2GUgsCMPevCxSTM1J6OlR6gNCfIIiyyyXhbW5VACQk8bAD4FsvmDsH3QBQAXmnV7yjVJZoinQytDYoTEE/aQwYs8SHjODYCD/5o4POhjp6eLk63gooX6Y/fErMUSUr5Jo8wcdubao65GLeuwR8ICmfdUOKbq/LyP+befBgLoahd SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 12:18:26.1144 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5348bcc-f2f1-457e-d6c9-08d5f15f8fc3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2614 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.69.95 X-Mailman-Approved-At: Tue, 24 Jul 2018 09:40:43 -0400 Subject: [Qemu-devel] [PATCH 1/4] 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 , 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 | 37 +++++++++++++++++++++++++++++-------- block/qcow2.h | 1 + qapi/block-core.json | 4 ++++ qemu-options.hx | 4 ++++ 4 files changed, 38 insertions(+), 8 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..53c7d2efd8 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2814,6 +2814,9 @@ # @l2-cache-size: the maximum size of the L2 table cache in # bytes (since 2.2) # +# @l2-cache-full: make the L2 table cache large enough to cover the +# entire image (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 # and the cluster size. The default value is @@ -2840,6 +2843,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..be4d862795 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -758,6 +758,10 @@ The maximum total size of the L2 table and refcount block caches in bytes The maximum size of the L2 table cache in bytes (default: 4/5 of the total cache size) +@item l2-cache-full +Make the L2 table cache large enough to cover the entire image +(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) From patchwork Tue Jul 24 12:17:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10542185 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 A0A8413BB for ; Tue, 24 Jul 2018 13:42:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AA39289F5 for ; Tue, 24 Jul 2018 13:42:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8787928998; Tue, 24 Jul 2018 13:42:00 +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 A4831289C4 for ; Tue, 24 Jul 2018 13:41:59 +0000 (UTC) Received: from localhost ([::1]:40611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhxZe-0002Jr-7L for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 09:41:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwGv-00052T-Q5 for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhwGu-0006HA-JC for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:33 -0400 Received: from mail-co1nam04on070a.outbound.protection.outlook.com ([2a01:111:f400:fe4d::70a]:43456 helo=NAM04-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 1fhwGu-0006Gp-9r; Tue, 24 Jul 2018 08:18:32 -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=i+Ib2CSExQ6fscep3kkhaiszrqdfHG11qZeOaHvFeWA=; b=WOmVjGBhlq97RPSB3yLmVlI9mrX0t5Pcjk1WSFa9bPNsr87fdg4qcgHlr1XOD4zjRclQaxMCyPPx/X86TWc0FLlvCmt7q1ZA0gBu+rw2y4+yCsruIE+uwmH+g4Y63urJATqBkF47TDx9BFAFb5Nu22E65qt64GQAiVnW/nF4lmM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Tue, 24 Jul 2018 12:18:28 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 15:17:51 +0300 Message-Id: <20180724121753.5753-3-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724121753.5753-1-lbloch@janustech.com> References: <20180724121753.5753-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: DB6PR0202CA0009.eurprd02.prod.outlook.com (2603:10a6:4:29::19) To CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 584f725c-ad4f-473e-77b1-08d5f15f9129 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:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 3:dhxMpLDqWcSicn8X4AdjvhmvbdKgU2gindBNas/JjE7sI23zwjyJTCEn5ReRLRpj1X4W58OfDae44DtYL+3CWoCgNZ+MRwmHouV7vZVLRVOKTHFbZmpdVKC7fqQQX9z1H5FRkbDOmdkW1ua43BOCctOJNyBqaSXvt360nA1qJvly+UI/3RZS9ZH+9Zz16CH0j30Y0Rw26gUM8q4E/0CxTLoDMW6jwFWRGtQPw2u+8FbCLIlD8rhwFbvMGadKjn1M; 25:AQg8++AarOPEo/fCM3aCUfVAD5KZGVpfRf0e2i5AXLPULzafzt7lk+CL04uw57+6nwqPFgjDAai/i11FFuc3rqttBIMWol9a2nHjH+7W/XE45pGDL3WDMpRTW0gUJeGxXHKLZfEMN20EJoUVkNXWkgcKLp/OR1O4uU3zDrRDhG0mUqLogNcH7fVVJK2fFSTcvjjaztn7w8Gu+EFd1L2h8snvBhsHF9M0gBv766dJqXqXJArt+P6coyiQW36xWOm6bdOdp2J1aEfLllupPvsyoKZ5C9OlIS/FR71N27++cK3R9gQfpnumJqVbkqGNoV9OMkL1eRhNFNJkZFti0XTB+Q==; 31:XQvOXidIBvMyyXKG/cwvTciKtcn+fHL4813enSARW6Ot3rNyASCKGpMwtZQmW8eIO5/2IhqsPHEjy4G9/UUBfxUeNiAewuun2OHxiAj4YAXWiOsFxRAXzsiZPyxqtvB1pMf58K8PiPjbSa2dVTN7mqnsSuq+izsRwgxF79BCP/WdZvXSgXHK/E6RiIrQ9uCNtRGaj34ZLrF8RjXQkLiC4RGU+NFt8Ik4eegsG+o03ZA= X-MS-TrafficTypeDiagnostic: CO2PR07MB2614: 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)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:CO2PR07MB2614; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 4:pEqET7gU4iZh5LxMLxMiHPULzm4JI/m5Fl8WbtuPDoHwWQgZT2R52LtYTC/DgdBfyZquJWyMQbWY8fxJMJV84mKCVdSjZkeBeuxhEFnoZ1Xu7VDJyf/MXaDCqqy6EVUQA54TRCJgkMhkMI9B915Epd32PMfCy8epx6UBvaY17imLmtny8bdVBh8BAvNaTAS+sUpXHbEV+b7U6K6xKWqeul9lhEhYPd9Rc5Zibb9JPy6lr8hri23sfI89PHZLqrwkHHJ7nKBYShsj5oEV1lGB1g== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(136003)(366004)(376002)(346002)(396003)(39830400003)(199004)(189003)(6506007)(66066001)(6116002)(6666003)(86362001)(6916009)(2616005)(476003)(956004)(52116002)(47776003)(2351001)(3846002)(6512007)(478600001)(2361001)(5660300001)(316002)(106356001)(76176011)(16586007)(105586002)(50226002)(25786009)(4326008)(11346002)(54906003)(446003)(68736007)(51416003)(1076002)(7736002)(36756003)(48376002)(575784001)(53936002)(305945005)(16526019)(2906002)(186003)(8936002)(50466002)(6486002)(97736004)(26005)(81156014)(81166006)(8676002)(486006)(386003); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR07MB2614; 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; CO2PR07MB2614; 23:q3XZwXNhs+ek17Uo65tfBFGLgLvTGm5g0Lmit3Rsi?= AbOfRE8K87EWXNKZurdK97lT05WAh5Edo6NQjo81IgFkWi1LahwmRHmTq0NSXQtcdafa/TeDELNsCDAhhHVhc2F+fr5DP1bJvMHYYPMrvFoU7IAzGwjyDnbb046dpT1/NId6IZhmhU+ceZPnpfQLUA6BufYBs+PCSlYZGeRsuSoAOvJrs9AxdPihXlEXHySb+edqGmvQrPUCZW0cc9c94QjAxpLnq0f8McmMq55LuJX2iHS84DuX1PWoTVxoP7ZNZbbVipbxJOQszgrj6LUl8OTeRbQ9Esu/xYeetIC+2s63baWnIMSuXecIfrrI3HFgA6FiajEJ38puFr/QInSU5SKv51rOkv7fwGRZeCr///gfkIFhsHNKgRtfSJJThzi7iYHtGmRxoJwWn2AZiog5uvIyh0bkCdTQm9NyLNjXd6yh0WoHY4gzuDJ3KyklErSNaepc2tM3XdDh1ZoB3i/aalJK2j0bfURhOvGCBDiLLG0LyR7t5YDccbEmSLwxqP0PABIFphXRzA3pHAn8psffe+kTg7dZuBbc4jlGXh8BDwjzAAXJ+GN8H8ElEKm4PKW9dWJGZHwORL4nc8iXz+gw7z+Xf2T+I0zbt+kFWflnDTLotynnvXSExC52hp8RITcm9+bFznFXN3kHZwZAr/gwhnHxcAqIXqTTqjdv9lhY1OWq9+sHvuXHjnzLktyuJLSe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enJHA78TQEXaBVh9TX1f8BzMn9u3GY4WIKDTr9gHpUyQxR74t5ljvTvULdmAFOQzbHLLQa3R/24NibtDutP9E6alVwFkoBbYq41LFTngpxGeIk8xOGdHMnsaCmkcGfIq2EbhgFWB/UYy+Q5Fpnu8A39MlX6+dvr34F0eIaQhAoB5CkSlVvyJcYD2MUkzF06jNNmMWYWW75oAMIXK9V3lpoSpnYNd1ED1YwJaGilS9DulCdFDapY8fmOmoJqdlMXE+ladLHG1+OTTMIEzbVBOclKP4I1RPI6/78M0f6ue9nTPd8Yam+PfY3bKsFcyGbjqZh07+Y9lMiMR6nHsQ8sSJUCyaA==; 5:16WhGKuwPt1OLDUeo7pXTXnryk+KdbYWRG9S9KwR75YmqMhQ3E6ybwigHtWEvSLm+9rMYz+wKfnJaKt1X2Nqea9sK+ll9JKcWgrItyDA3oNuamgvX1mwEJlUnZXC6h9WqKm171j5OzYE9Ys0H691W56D0nVoD6AaEy3VCz47v60=; 7:UzZPDTJgv2P+Ekjk2noOLaRIEhtV9YnELOeUPYAA1ncZG42UICsboaT46gRdTdrbdMcOlv2peMB/ddPa7WK9LeyhClyTrmJHZGCFQHR0NshYtOlMTO6/f/hazabmERgRtrnn6ahnxA9TmxQlKbm4os5zf675VP8hkxOnMZz3W8Q/k1OROsDf/kEsIIpMdNY/6qKaT3KYYu2xVBcdMpMvaaGe3pf24ILc0sCLETm20kIVhoVKBs5z3+EfXYix27AK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 12:18:28.4581 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 584f725c-ad4f-473e-77b1-08d5f15f9129 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2614 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 2a01:111:f400:fe4d::70a X-Mailman-Approved-At: Tue, 24 Jul 2018 09:40:43 -0400 Subject: [Qemu-devel] [PATCH 2/4] docs: Fix an inaccuracy due to recent changes 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 , 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index 8a09a5cc5f..a0a1267482 100644 --- a/docs/qcow2-cache.txt +++ b/docs/qcow2-cache.txt @@ -97,9 +97,9 @@ need: l2_cache_size = disk_size_GB * 131072 refcount_cache_size = disk_size_GB * 32768 -QEMU has a default L2 cache of 1MB (1048576 bytes) and a refcount -cache of 256KB (262144 bytes), so using the formulas we've just seen -we have +QEMU has a default L2 cache of 1MB (1048576 bytes) or 8 clusters (whichever +is larger) and a refcount cache of 256KB (262144 bytes), so using the +formulas we've just seen we have (assuming the L2 cache is 1MB): 1048576 / 131072 = 8 GB of virtual disk covered by that cache 262144 / 32768 = 8 GB From patchwork Tue Jul 24 12:17:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10542189 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 25D0714BC for ; Tue, 24 Jul 2018 13:43:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 150DC21FAC for ; Tue, 24 Jul 2018 13:43:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0895A2858B; Tue, 24 Jul 2018 13:43:04 +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 8AE7D2858D for ; Tue, 24 Jul 2018 13:43:03 +0000 (UTC) Received: from localhost ([::1]:40613 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhxag-00033O-KI for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 09:43:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwH0-00056A-6o for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhwGx-0006JB-20 for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:38 -0400 Received: from mail-eopbgr690103.outbound.protection.outlook.com ([40.107.69.103]:55477 helo=NAM04-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 1fhwGw-0006Hz-NF; Tue, 24 Jul 2018 08:18:34 -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=s75tDprshF3lQg3qyqpn3Tga/o6TrP52+C9ySnZOyrg=; b=WeD4caOSFxZjjdm5f0xgLOIxQsF9JWjm+74GLEdvZsGA8jgzBF29XfF2QP7xYjsTEQNySMrxccYjTCszRuyRR6iA/FUnVzmTl+wIJnSpqC7rwf9I+50x7XKo+JlpIZJ9kCZ7JrSYgVRqLJG4nGC/837NHEk52nl6HIFGWlMlyPQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Tue, 24 Jul 2018 12:18:30 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 15:17:52 +0300 Message-Id: <20180724121753.5753-4-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724121753.5753-1-lbloch@janustech.com> References: <20180724121753.5753-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: DB6PR0202CA0009.eurprd02.prod.outlook.com (2603:10a6:4:29::19) To CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 71c30d17-a4ec-4434-8dca-08d5f15f92a4 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:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 3:/OpwPeGGL80SVxkBGONTfkd2uLhJb2HgKSedOB53XQisDUOhnIJui/A3X0OAvUcyuIJOmP385Xi1K+B1kUFLuPdQaCdgkAFeLE5yJJeIFnOigh9i5aVWqFLooFEABZ6Ey44DA+LzQCTUFan9lI4OzEZL8H1kD0y5LliJQHJyJoJie97qcKtX8gBLUlPU+mgSbpCNXgtreA0//4qw/Re2x+q37PcNobTC/tKNvbqon+4BpTAbJQJqEnrY4Uus42ov; 25:qWdG8PsPzzrhjl1+EeNTvmGKdVG587FoS364yMXYkrhvC0qa+xTRy6YHAIiJS3Bmr4VMVSxKGZtc/BmxqJs5qSl13SRzS6zQG5adH6H2HT3N3Itne9RiV2Zsr4pAfjnbM7OyPhRXrJTWzOL9llP1c3QfQLUlGN8F+jejOFCqtewRLOfM6CVPeL1d5ARTQvd8J8bCorQIIWVM5TpPvYa70YNyIqLpkPXD1cvxfv44G3nGwE4kNWUcoKcoReyd++s8a/Xn8OjYKDVHo4AGWex4pPPKw5BUae+OyTOoHEUzcOpaRYQY1fkJbMuiZ7USugxXK8AWOpX2CcYOaPuvfSkx5Q==; 31:k11iS6rPadUFx0YetMtZaL+nbuLNnDp/g37EX3M72dudoBWb1XxxLlkOH0K9XikQoqXyttvF2xxbTGtbV5Og6zrQJcOeRTbFQ+Ce0AQda0yLuhSZP1tFEgbrY+cxM/ybHy67M9Yo2EmNhSRBghxPq81RSYhEq/xCkjdF9KLZ3LKCBmCVKLU/iZvEiWGPJVRTuOwWTEQeNKGTOyjWWCw6fM1N4ht5u9AVIQT9UjtgiLI= X-MS-TrafficTypeDiagnostic: CO2PR07MB2614: 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)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:CO2PR07MB2614; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 4:RjKsYIm7j45AeCsVtJ8Ju6ELBMN0lKyGvhhQVCVHV9RHSGUN3sSyKE1rz/fqtBfrqzZHd6Mo2tFBw34i4vodbY9kio49Wo0EptoNC3v6i6Wr2Hx7gEdzHesGVZxVExjuZw2LD46hGH3fgr/c0/IpC3SD4xE/3wvEHP49+oSt7CDhE6mG20WWZkhhgq9PAJiSTihv5bZPR0nohyet3D6rmm5gc+8eD9VCEfd11TVg0P62woX+eUTaZQc37pm4UhUzcYbFq1Qu7Uu7BPG+YDfnUw== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(136003)(366004)(376002)(346002)(396003)(39830400003)(199004)(189003)(6506007)(66066001)(6116002)(6666003)(86362001)(6916009)(2616005)(476003)(956004)(52116002)(47776003)(2351001)(3846002)(6512007)(478600001)(2361001)(5660300001)(316002)(106356001)(76176011)(16586007)(105586002)(50226002)(25786009)(4326008)(11346002)(54906003)(446003)(68736007)(51416003)(1076002)(7736002)(36756003)(48376002)(575784001)(53936002)(305945005)(16526019)(2906002)(186003)(8936002)(50466002)(6486002)(97736004)(26005)(14444005)(81156014)(81166006)(8676002)(486006)(386003); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR07MB2614; 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; CO2PR07MB2614; 23:jKwfTTlS9TTY8e+dK5uzHzKWNZvv3J0yVEoGX+Ae0?= 5VVBXYmoySN0llilQUiMa6T1yvNFrrxfMGCsOgMww7nBq7cIbpm0hSm5NSp13jsDzbR/Yl98Dqlcjwx1gdCiQbetCmY7PdfPjB0seY+LNmbi2lA/AuV7BjdhUmQNSDt9rQNQoEO+DjtA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UteqNIkSOLq1N7Eoxe3IR9HQimLXiPuaLVUMcbuXKxdleI4wR3hszY=; 7:dmhubMzdrIrimcjp/Z8KVsRoqNEbLXkLx4E9tRGBAxmBQI1pD/N8xpuAPrPYLpsurpyvjmZgaLGVoo/ySxMpAxNGqhTl0B7c6lzWfowlwFWsETSogMTJ4wbAz8Z9jZp4phSsFwy0he7czwgCGwcGQSOOIKWtJn+xb8Cxp/eEEUIvzbK4m/RAdQn3VQGCvqoh1nQAyEoUddewbtkk+/YdCXg7o9ykho3RnveqbwCgX2xtZaMYHp15Yqn3v9l+5XKN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 12:18:30.9425 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 71c30d17-a4ec-4434-8dca-08d5f15f92a4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2614 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.69.103 X-Mailman-Approved-At: Tue, 24 Jul 2018 09:40:43 -0400 Subject: [Qemu-devel] [PATCH 3/4] 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 , 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 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index a0a1267482..43c0faaddb 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,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. +- If "l2-cache-full" is specified, QEMU will assign enough memory + to the L2 cache to cover the entire size of the image. + 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 From patchwork Tue Jul 24 12:17:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10542193 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 BFDC514BC for ; Tue, 24 Jul 2018 13:44:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF85328916 for ; Tue, 24 Jul 2018 13:44:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3D9B28926; Tue, 24 Jul 2018 13:44:57 +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 79F2528916 for ; Tue, 24 Jul 2018 13:44:56 +0000 (UTC) Received: from localhost ([::1]:40633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhxcV-0004Te-Ka for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 09:44:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwH2-00057w-QK for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhwGz-0006Ld-Ko for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:40 -0400 Received: from mail-eopbgr690118.outbound.protection.outlook.com ([40.107.69.118]:45463 helo=NAM04-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 1fhwGz-0006Ku-BZ; Tue, 24 Jul 2018 08:18: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=IdSW7MLN2Y3q6qpEN6LvZ6BLhl6eqTS69dRr2zLeLD0=; b=prZyRnFsg/Y2jfTavz5a/TkrGXnje4KyCau3K6h/KtuO83+jIFixpSwfdlCSuqaS6HhuYoSPLUoPQDIYinZho0NsEquWz7/afiGINM6VH/Oh9BoAqkjVSfueXBheNl/beEIfqfoY2kC7fb1q5pq8KKH8u1eH2OD5n8EmWQzU7jo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Tue, 24 Jul 2018 12:18:33 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 15:17:53 +0300 Message-Id: <20180724121753.5753-5-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724121753.5753-1-lbloch@janustech.com> References: <20180724121753.5753-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: DB6PR0202CA0009.eurprd02.prod.outlook.com (2603:10a6:4:29::19) To CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 40cfac6e-6bdd-4fe4-9104-08d5f15f940c 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:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 3:owRPlYQC3tedYCo2kEKwxx68kbjwBWR4f3mnBEu3htYUFm+wBjo8QFeb7dIRt668S2Ciku+m4iQ53r1MsvI1eKu9PZWc3HCdYJhi9oDtP9aKqlcENXDgOyK9uFn942ZRc3Xw+jik7GNhB5TiCwE2PPxx9x2fFgro383z8eGxA91CVbfwnuiEjzi+f25T3zNww5MWnenmzBKu6L+ZaVSseXQSrTz9trzGdLgmiAzOSgHIs+c9oiCJ4r/L02OL8PWO; 25:LNDMGTaFy/c4Vw4XeiYxN7E+2tmMEQnhshI2HNbhuHZ9rt4FFRwosyWDV6eNqrKIIT02YD8nbMO+LZaC6dQIMpwuNrQZtEGXhaz/BVlY7cY1EBW4E1MWt/BGpEHHlJH/Son+/RbuxXGrorMJxqYCKrvwDljQFvWAl/4noxZdFvEsG7YiWrP4NCTB8TJdL9AGz4BvOy8h73EDu92OsOmOQroHwoa8qTz6PJiT628yzSBP5kckHaOKZfiOMFVw2qyOEmeC3WRLK4OreqDOg2CKuQZ2MSRoMH6Vf1h5AVYLWnPEOuxyYhrA0pehtpyeXeAlHw8X5g/qEL8BbRDxKrnEMA==; 31:gHFGOTYoro3hX+Z/vY/btNkaVm035jd7PHniKZSW2qduxUdEVdRDanO3N1Q7y5AAOIs/Np9Jg2bKA7apbjcf9OBpTiXVwzcbN/2+nb3Z7k/B5vBbXJUVoLdQ6C0VkIShi46mgp7Q4XcGH5/5b9SwkwOwJ+7S1Ynz7gZehioaIUnunTekrfEkVWQOG+8GOStHc0NzQSXjtl9ifaAPy/X7TTWL5upk6TkhNuV2CMbKVEQ= X-MS-TrafficTypeDiagnostic: CO2PR07MB2614: 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)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:CO2PR07MB2614; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 4:soEUHkJC2Ai1gXyWl8xHco2hWpbpJRODsY87Dl92VyUqu2ZmUCtzEI7i8X18d7ZVm38Bq3WJ0QcMpTOaDTH3pYo6+BTDY6YB/At9+hOkx2GEbXamBZ01ShTmfxSwzpgCD7YztzMWjWLJpCUki7xtrfytQ9k+0N/3Eek3Tdtss2GaWS9m+D18c7kg19PVxoRI8pxBD5NyX9xvkp6hkth4+62nxwWagYfJpjE6G19HoWOd+f8b89qV14VMIZZHpcE0Fh31Hx5xB13iatx/M24HCw== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(136003)(366004)(376002)(346002)(396003)(39830400003)(199004)(189003)(6506007)(66066001)(6116002)(6666003)(86362001)(6916009)(2616005)(476003)(956004)(52116002)(47776003)(2351001)(3846002)(6512007)(478600001)(2361001)(5660300001)(316002)(106356001)(76176011)(16586007)(105586002)(50226002)(25786009)(4326008)(11346002)(54906003)(446003)(68736007)(51416003)(1076002)(7736002)(36756003)(48376002)(53936002)(305945005)(16526019)(2906002)(186003)(8936002)(50466002)(6486002)(97736004)(26005)(14444005)(81156014)(81166006)(8676002)(486006)(386003); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR07MB2614; 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; CO2PR07MB2614; 23:/Mbj35sJHgUkjL/jQr+elPHuCYDAQKVV+VvY5NTlO?= j8QIbvpZT/Q/wMfY5CfzWfSJRNFveV0Pf7vp1yXUo835Zs2ljxrljcJNPNVtOBfPqJbUHC4Fol/fC7BHYGz5GbfgbHGXY1P/NaTRkvjrHJz0UppeeYbQfe7wGpl+DOzFROwgXUIwlnwsjixXxgySKfKbGgo10wQSArEqLkURdBHmk0GbMSF/7R78b3BRL1n3EjkTENxujJy0nC+j8HCD3r5PWDpSHGrL0FExSyo2EUCxOefenH1aLyR8XacIPVEaC9xNVl57XXVqghCKnx2ltjIbIwiqtrK2l1xWC0KAL/qB7Qfd7XyR4DZOmM+wI5X5u+zX6Wb9vxoJ6bNJOO8MV7LYawvQP46/9tfN0hV/sbsoGOI9JYv2hyFVK6s00Wg4N+GhzrdMcJXIijGLWA42AP2Grd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ho+qA3WCoIuLztaeL5LoIZuKmU/v SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 12:18:33.3019 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 40cfac6e-6bdd-4fe4-9104-08d5f15f940c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2614 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.69.118 X-Mailman-Approved-At: Tue, 24 Jul 2018 09:40:43 -0400 Subject: [Qemu-devel] [PATCH 4/4] 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 , 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 patch adds tests for the l2-cache-full option, and also intcoduces a small change due to a grammar fix in block/qcow2.c Signed-off-by: Leonid Bloch --- tests/qemu-iotests/103 | 6 ++++++ tests/qemu-iotests/103.out | 4 +++- tests/qemu-iotests/137 | 2 ++ tests/qemu-iotests/137.out | 4 +++- 4 files changed, 14 insertions(+), 2 deletions(-) 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