From patchwork Thu Aug 9 21:53:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 955869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=janustech.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=janustech.onmicrosoft.com header.i=@janustech.onmicrosoft.com header.b="ZzP7o0Ky"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41mjKj3d4rz9s3Z for ; Fri, 10 Aug 2018 08:17:13 +1000 (AEST) Received: from localhost ([::1]:53175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fntF1-0000ja-1r for incoming@patchwork.ozlabs.org; Thu, 09 Aug 2018 18:17:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnst8-0004Oz-GM for qemu-devel@nongnu.org; Thu, 09 Aug 2018 17:54:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnst6-0006cE-Qc for qemu-devel@nongnu.org; Thu, 09 Aug 2018 17:54:34 -0400 Received: from mail-co1nam05on071d.outbound.protection.outlook.com ([2a01:111:f400:fe50::71d]:44661 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 1fnst6-0006bI-FY; Thu, 09 Aug 2018 17:54: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=p3ogQsDfqHAGpOYmTKKWX4A8pNpamGCuEyrh8Chkxd0=; b=ZzP7o0Kyajs7kSgpOe12H28HJlpfCd+zi1WxbCjwhBCk71wAKAJr/aCLyFKYIdIMPXOiDCvppLzyeK7SYrormJA4IQbdw1XrSL+VakpO1Le4juZiqhpM94JIQWgPDk4k4iAwEmSpfq3devUDDGCUqzUzY+/IyP3x98PAAdhxqWo= 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.1038.23; Thu, 9 Aug 2018 21:54:27 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Fri, 10 Aug 2018 00:53:03 +0300 Message-Id: <20180809215307.18241-5-lbloch@janustech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180809215307.18241-1-lbloch@janustech.com> References: <20180809215307.18241-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: AM4PR0101CA0050.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::18) To CO2PR07MB2615.namprd07.prod.outlook.com (2603:10b6:102:14::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d8441e8-16ee-4144-f1f8-08d5fe42aeef X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:CO2PR07MB2615; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2615; 3:rnXC3SPYT1CCdJ0v1GqunPfrJm2tcZSVtz5mmqxH1d7pblAo9sKxbwf+Oj6Ksk8B7M/xSi1/waN6v7pXPioE22CWG6pxZq5AQGiNeTmdTllvUUpVdJ0/mM8aigLIhC47YoDiZe44M90xOLQ2Ps99cjSGG7nZ25E3JaM1oGmByuvDOjJX1aefgnoiNir4kdX8Wm+BAcJqxyqK6D9DIfokOxWTDqHi+i1kOM58hxzLU0Q9tithMIt1ADqb/j5T0mDy; 25:urUjgllDzof6+5RslEEKVX1ajn4PiwTj/+umb+QXTdXluMVbONJMNWY8lgHAxDCrgvKSc74uJFtyU4cOSPwpLSxjadcnOspp1Wzzf14SrwXvjA9ZpOtJgNxEoEbDP4IsjbE/iMP/1DTss8Lp0JdT6l699rmf7hIWQxObMiD5q0j1NEzPOHEGTHKUimn9Y1kYbG5yVnVeansA43ZDTtQZPUaX8OgTM4z7nLfycaI5WWqyyUv3cTvhKg288IlKpCvooLP5lMf8BN6dYTx6SQmif7TfM5rVzqSthu5u98mRUASByjZ+el4NjHbqvJzLLoiR3mHj1wcQrljvhFa6jeSnnQ==; 31:6yzROVmm9q3xGoGB9gCMHRWLm8I2JK2+nWSNQU/p128I1DjMqw69T91aVaCCUO/HEdOw2ZRLEZwmfbZfyv8lKYIy+IeS4eBh4ceeQr97q0SEDVyZit6UuAE7Yw/efpFbxmN083knaMG7+0yV941H1OiSj3CWJWhOsxgD80SZUpKA+ZVYNb2igGk5MVciEuKpmFsQff9tuicFUgHwmbcL88PeCT7TBVpF7xuc2zf7T3Q= 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)(3231311)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(20161123564045)(2016111802025)(20161123560045)(20161123562045)(6043046)(6072148)(201708071742011)(7699016); SRVR:CO2PR07MB2615; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2615; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2615; 4:7fVjcKpTaolwvBod3K2xUkHmoQnAAfAtgwDMIzISyR6UZkGR0x2j1XR+OdxqCYOn40Xv8xDzvLuyQd3Te7apZCtixxhVSlP2R8hKRW1KBvV3qOpwvhCuAhpZrYMl1nkCplmmjEPey3yq4W86Es+e2bbH8/rkYRD3isWyNVgYPmPiGV3PaGSi/LFEE+++vKX5Xjbvxw6mmO05aTinbpgM3n74Geh1ECCQWMZbQxFe+8K99asFPHXiZWSRKIfwg4Lvuf5Bxi91yxiJnqspgQLZng== X-Forefront-PRVS: 0759F7A50A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(376002)(346002)(396003)(136003)(39830400003)(366004)(199004)(189003)(486006)(2616005)(16526019)(86362001)(6486002)(7736002)(8936002)(16586007)(48376002)(551984002)(478600001)(446003)(81156014)(68736007)(81166006)(186003)(476003)(26005)(305945005)(386003)(2906002)(8676002)(50466002)(50226002)(14444005)(956004)(11346002)(25786009)(316002)(52116002)(51416003)(6116002)(6506007)(1076002)(3846002)(5660300001)(105586002)(6512007)(106356001)(6916009)(47776003)(36756003)(2351001)(4326008)(97736004)(53936002)(107886003)(66066001)(54906003)(2361001)(6666003)(76176011); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR07MB2615; 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; CO2PR07MB2615; 23:XkfLDl8N1JFiOnLpGeo+5VpIBG6qQCNYh1GDBLynU?= pKQtygJ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5:jZWzXQp/ZvojNe3hTsqSe1PANSuXFd0uwOSYVmpisazVbH2UA8zgh1cRhNaVVcUCiLq61ra4apPKQPob0cm/ME1K1AOedIi7b2XHnzrC6xPK2pKF9WPj9Rp8vNfwOroOXx6sghItEn4ri7UzT9KF58funleR5JYpMInrnYFZKdU=; 7:rSnzg7Td0LyyiDeVfAzePDSFUqumC7Ks5+GHUuxYfuJbj9cTPbGvpvCDpaIPxszBEQXjjFodi2PepfNIlj8MZ4iFgs+BSgydqhmx7s1LC89pmFG2I2jO+T7bOBBUq3JotHRxXHUqqFfl5BzNdVJLq58aDzc7K3mhbO0Kp9Tv40Uebbvn7MkcjfYFqs2VYkvq11TlghGs3K9MZS2MLeumsKaL19mWB2xqT+HW+NPic5FOBZ3QxifBihb+8wp61fzC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2018 21:54:27.8802 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d8441e8-16ee-4144-f1f8-08d5fe42aeef 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::71d Subject: [Qemu-devel] [PATCH v6 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Sufficient L2 cache can noticeably improve the performance when using large images with frequent I/O. Previously, the L2 cache was allocated without considering the image size, and an option existed to manually determine its size. Thus to achieve a full coverage of an image by the L2 cache (i.e. use more than the default value of MAX(1 MB, 8 clusters)), a user needed to calculate the required size manually, or with a script, and pass this value to the 'l2-cache-size' option. Now, the L2 cache is assigned taking the actual image size into account, and will cover the entire image, unless the 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 | 22 ++++++++++------------ block/qcow2.h | 4 +--- docs/qcow2-cache.txt | 13 ++++++++----- qemu-options.hx | 6 +++--- tests/qemu-iotests/137 | 1 - tests/qemu-iotests/137.out | 1 - 6 files changed, 22 insertions(+), 25 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index a8b65189fc..434fb89076 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -777,16 +777,19 @@ 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); @@ -794,13 +797,16 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *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; @@ -815,13 +821,9 @@ 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) { - *l2_cache_size = max_l2_cache; + if (combined_cache_size >= *l2_cache_size + min_refcount_cache) { *refcount_cache_size = combined_cache_size - *l2_cache_size; } else { *refcount_cache_size = MIN(combined_cache_size, @@ -829,10 +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_BYTE_SIZE, - (uint64_t)DEFAULT_L2_CACHE_CLUSTERS - * s->cluster_size); } /* If refcount-cache-size is not specified, it will be set to minimum * in qcow2_update_options_prepare(). No need to set it here. */ diff --git a/block/qcow2.h b/block/qcow2.h index 81b844e936..0bab3d8b94 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -73,9 +73,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_BYTE_SIZE 1048576 /* bytes */ +#define DEFAULT_L2_CACHE_MAX_SIZE 1048576 /* bytes */ #define DEFAULT_CLUSTER_SIZE 65536 diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index 0f157d859a..69af306267 100644 --- a/docs/qcow2-cache.txt +++ b/docs/qcow2-cache.txt @@ -124,8 +124,11 @@ 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 default L2 cache size will cover the entire virtual size of an + image, up to a certain maximum. This maximum is 1 MB by default + (enough for image sizes of up to 8 GB with the default cluster size) + and it can be reduced or enlarged using the "l2-cache-size" option. + The minimum is 2 clusters (or 2 cache entries, see below). - The default (and minimum) refcount cache size is 4 clusters. @@ -183,9 +186,9 @@ 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. + (the default behavior for images of up to 8 GB in size) 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