From patchwork Wed Jul 12 11:46:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Butsykin X-Patchwork-Id: 9836549 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A652060363 for ; Wed, 12 Jul 2017 11:50:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 959A028584 for ; Wed, 12 Jul 2017 11:50:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87D82285DB; Wed, 12 Jul 2017 11:50:42 +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=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, 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 AF148285C1 for ; Wed, 12 Jul 2017 11:50:41 +0000 (UTC) Received: from localhost ([::1]:52005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVGAC-0004yk-Vs for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Jul 2017 07:50:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVG77-00032l-1w for qemu-devel@nongnu.org; Wed, 12 Jul 2017 07:47:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVG76-0003ir-0o for qemu-devel@nongnu.org; Wed, 12 Jul 2017 07:47:29 -0400 Received: from mail-ve1eur01on0107.outbound.protection.outlook.com ([104.47.1.107]:46733 helo=EUR01-VE1-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 1dVG72-0003eJ-KT; Wed, 12 Jul 2017 07:47:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=edUsx0krBUZ7kq65fizSUVGG8c90XXMggB5pKqze42A=; b=gSiNVjSXsMcNwilyIxYCvltqKOnS8wenRaN4EU6JlfJkw61qf4iFqQChMJ+BvWiwYuJfqGjqEIHp3+hLyh4a+QFz45G4tVWQFcq3jeygYrf+0loeHonIZ+dO7pf3y8hBKZtKpIV5HygPZxljXb+5z6QzG4aUf1o8nis9euVYJHE= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from pavelb-Z68P-DS3.sw.ru (195.214.232.6) by DB6PR0802MB2551.eurprd08.prod.outlook.com (2603:10a6:4:a1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Wed, 12 Jul 2017 11:47:18 +0000 From: Pavel Butsykin To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 14:46:58 +0300 Message-Id: <20170712114700.20008-3-pbutsykin@virtuozzo.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170712114700.20008-1-pbutsykin@virtuozzo.com> References: <20170712114700.20008-1-pbutsykin@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: AM5PR0201CA0023.eurprd02.prod.outlook.com (2603:10a6:203:3d::33) To DB6PR0802MB2551.eurprd08.prod.outlook.com (2603:10a6:4:a1::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f7de0d29-e422-4c45-e33b-08d4c91bc060 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DB6PR0802MB2551; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2551; 3:aT7WcJ+wMWUOillkAAGSOlKIzaPzd5ZpSj+8s4iBXLGCvMsbfwUn3W2GKjHAOKn9Ja87omUCXHH5MEO8GQMZBdC7ZLsefMa3cpz/jNrUqdk8heOR/ZHU87cXtBWEjceegr87tIL0WZRgDVKqLqUK4yhVbdOE9sOezoY5HYQeylAm73r0Vhmkfh4bR+KvwJeS8a5jE+tZ7i/X5MW+pyUxEBp1xC/PbzPwPECrgKVzMvIjw5ANo3itQ8roahY8sm9aYL3LF21sMZ36YfSlGW9TZHAzIfY7W4H645wxFcEGSfPcrZwVUP6W0U5VtlfU6B0jOCeoVSGdzaOfjUmWD1O41utwGt9+LVXHKedl6oZREq00iVKZZyzMNOrovWs9qMHfuHGhK/p0GDPoJGswfjG2lpRFvPrLdRFhywf3wFimtcOhoGijSxBvDjZKpXeqY3CqNW3GZF/0orm2fCSmQd5e+z+349LkVqQ6kBZ6kMeIwCZXij0vZkZIUO4BeokOTWoHGQRi+AbsCbM7W0ojYbr5I65elIt9JxC4mF2daHnXj212uDCtkir/lutO/q8PuT2dNs9s2yFsJu5eEWw1FoEB9aoFqxZ3s6tCn6jPVaCOA4kiCCLFhleLPILQWhg4sAvbLEyCsOB74HsTuoiQD7xscHtPLDUdWpqXLaJTtfBn7+tNYTPsHggPbmW2bKnkucSQhLUZluDMduczeYGExgSq5wLRc2WECrD9XslklMaSiCM= X-MS-TrafficTypeDiagnostic: DB6PR0802MB2551: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2551; 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:(236129657087228)(167848164394848); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0802MB2551; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0802MB2551; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0802MB2551; 4:NjnGttig5GkdynxITbftpysTQkxCrc4D1//Sj8Se?= =?us-ascii?Q?flSaJkaDOXtxaPpggTohXFtOygkT5UY4MYbaz2Hcm8wvUgj3RTvHtT+mEQQW?= =?us-ascii?Q?MF11Qqj54IkPS0T1yOBND1qc09DOjRsXusOr6PsYNdUbvSSlsw68nSu7KpBV?= =?us-ascii?Q?GhtRNXO8yiwDEAW0KFffMWG/hMPV+ecTi2if2V5Z4zOeuM8/qPg9JggGr8Ia?= =?us-ascii?Q?9CtbOu2fJ6pMkkNsJ06NSULpnPzqTTibB70JeoU9rZvl+SbBFnM3vS+wg3ey?= =?us-ascii?Q?/Q+Z1aDeTp/VWN8RDWf+l6KManVBDeN+ITa+qrx1OkSBy+py/HiC2L6lhauK?= =?us-ascii?Q?egj1EMnrXmFWoxck47yZKyHI1fkDdGs7zhMSBPAq039G4qeJIjdKCr9xSwbR?= =?us-ascii?Q?pOw7lgPartS+ezkAclatlwJm3aW+rduJoLu6HR0Tqdo1LyXSgf/uKnsNNrE2?= =?us-ascii?Q?VwEhv9VuqTA+SN7HZ/VkJp2O3o0pkJ0UoQ66WTw4Fk8lNwcZCcUfhPwM5212?= =?us-ascii?Q?c7gr+kcFAp+o404ukZgsuwsjOaVfh9J0ycWat2jZN4AqcpA/n8LTpTCe329G?= =?us-ascii?Q?ZmkKjlnCeh3Tx/M0YJN76UFmyW9kYaUeme8EgSTb/PH2zjSAq4j3NFDGLned?= =?us-ascii?Q?muV8rhQlOpUTdz2pUs69qnKVvdlvvXiv6POmxFUUOmROXewLLKWCSX2+n3Dl?= =?us-ascii?Q?iTcEq2fEtrg9lDL0MnP8192toBaf8kL52Rfqz7qNtc3CY4MWbJzhgBzv/Inu?= =?us-ascii?Q?fRPyU3M6DPFS6toP9dKxqHogFBFtC1fpgOzMnn/zPje6F4/01x7CLrbAt1yh?= =?us-ascii?Q?DnFG2Ffte1tBYnzmhfjpVELZn22XVv07VO32f2FYBIBVq70IbVQWK1W+itV8?= =?us-ascii?Q?HzroVpn7DP25YN3oqxUbHMvWiQ3FcMr3KEDnowMHIndiqGbcebVdgV9KSg+3?= =?us-ascii?Q?1FBenv+0h9O3ExlkWeganFQSoKMg8fyJ5rY6M7AYaTkuXu0q8r+9LfDvwVFx?= =?us-ascii?Q?cbp7k1VXS1IQUfO9ecltqUS4/Dc9qAjjUjbS7ZM0XZ+NVLjs3oYHQphVUx40?= =?us-ascii?Q?ykP0EVFJkGykP3ENhFfYhopHaQfbPj+OU4Cwip4CsAW2yzpHWF156QiYNe8r?= =?us-ascii?Q?lKxOoMlHmTCJEXCbUNia17xLUdbZVoI1CqM9Hpt01JQta9d0KmyHWExdYdUT?= =?us-ascii?Q?VoNfOufauFDh65LA4OY+G7n4+se3KKh9dmIJ1X9snMCtqF0yaVsDmXuMTtuj?= =?us-ascii?Q?qLru4fEwSM4dqYpHBoU=3D?= X-Forefront-PRVS: 036614DD9C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(7370300001)(4630300001)(6009001)(39410400002)(39400400002)(39830400002)(39450400003)(6486002)(66066001)(478600001)(6512007)(81166006)(7736002)(4326008)(8676002)(3846002)(5660300001)(42186005)(86362001)(53416004)(1076002)(575784001)(110136004)(33646002)(6116002)(53936002)(76176999)(50986999)(2906002)(38730400002)(107886003)(5003940100001)(36756003)(25786009)(6506006)(189998001)(50226002)(305945005)(50466002)(6666003)(47776003)(48376002)(2950100002)(7350300001)(15760500002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0802MB2551; H:pavelb-Z68P-DS3.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0802MB2551; 23:WPWHb5OwHFe2ub7A6BnwAnRIX8oT5jEQh3UccvG?= =?us-ascii?Q?cP3PeKjUAEbrUVBzj2IcFPPXKPXlNe5Z1pbnpdhnvco1+l+v2p543eXwRx7p?= =?us-ascii?Q?zB1uG1cdYj1xfszhticcO/a7DtuEzx+WLevI+zjorNscGdDonUH1g49Kh57A?= =?us-ascii?Q?ajQmpXhbgoYatkrSx3LXSqVIR1yN/5lRDToOW8sOqQUW+TodY3Vj8NKkf8o9?= =?us-ascii?Q?vuLyBPgkohI/JyMDXCKe1yAzKKKDLeWXefl4sIgt0f5pGFQz/INK81LE6X1j?= =?us-ascii?Q?+ouqQG9F+i1zYYKJr7zxw1BdWURy4MXPk2llShTiWP2iHZPovWUWRYnFUPXi?= =?us-ascii?Q?A0Q7/ceKX75ziO58hxtw8wldXLYka7SL4fBVTzheKbtyjI9mOms1VI03HedM?= =?us-ascii?Q?s9zbEomcszJJnUZ5OG3CQ0c0RWNThs0nye/odaUCzWQjtJD8JksDXxh//R1z?= =?us-ascii?Q?s94Qfc+NWq/EYloU72MDm5htExEEsuzuw99NIxrXhiui6re1Tl85vOgOeO0S?= =?us-ascii?Q?6vc3nLsFFgoGk5/3+rKX3DtsOZTagLV/fW2YC8dVvPk5ulkG2PEU8dnkgXJL?= =?us-ascii?Q?F5J9tqHU4qXx1U5UvQDhUITc9pkvD49hA9U2Wr8aTFlDqf/+6ZuDIQ5bgEkK?= =?us-ascii?Q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FXEVUh60cdyol3IGcB7bi75fr4WkxVDC/SOoIvuvvxNLdHKZrOzNB7rmk1DK+P/F+OSltvswy/dw4i7PrWb7yl1siCeNXysEg11w8Gt4rW5GnZPjDnb2LyES2K3QMYh/ZZpMpYih/BdAw7vWvEcKbejHJJiNosp8crekR2xXdXE3RmabDRyL0xonSLa86helLbr1ZQJQP9yjoCW+MWs13QB1BBilMmDJuTdfiXDRYPKkkc06cfR/LRfPAk3t9+7FF/DAaWffif/MYjoYFB4PjnWn1wqr372aGyacnUyJvDggGQy3tdymGvLgCs3dX9cprfPMGGWnUEF9ohOQs; 24:phVKtE39HSI11LcfHHe+WID4peZUHHS7ciKJGBW3BMYhp8vKmq9LF/bHj0tHtGk8T0HFKnZ3N3czqaDfr5ssIN2X9qXbwppE/dPbgVg34Pc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2551; 7:D/OwIenbSqbhcvDssNdWE+x0TUsen5yu6ogJreeeATbvr6At/OVnGDLDBzobIUbJ32IPQRE7KisEae2MAoZeD6x+EY5NanFSJAHzcW8CblZT4QTxRll160SEBl8HMvDZ/QTov2Gw5cEd1TzIOorB1PxlXhXTpj+enXaMF1LnUnHFIEC86cfiFDpxncSIvV9/Biy8k1TN1RBX20NdODN0dDVolB17aLiw+/baktS4+mWHzLoN1nLr6Kxp8v2Pb+gmDIQecm1os04XAvPuJAKsQTFsfYI2dmVedMf0kz4g3rhYoIR9TDwvHx81DomvTT/9zEkWexOo3kfUP1wPZOFTh4hKAdAY8DpAMjb0apQNT5p6B8Dqfu5H1H9UoCx0B0sGE25UJX9wkiUX78c8KCbewBPXljSuU/f/LoUqDrD8BASCDhejthgXbd/ZoWybvp5fvf5K4sSyRQBxp5T1P3T22o66kyl90tSuJjNRQO6maiI2ICm+0DU6TocrWG5NDlQniekI3NY7SpSce9DWFapo20uROwJzxMuaNBPduZDjXokciIUtVx59cLm+4899/KlNyU7gMt8vLvw6SyPR+MvrWcJDxwZFft+VWBHk+hwl/4hLMJZmP/LEJBBhL2r3x1VINOZiQMnLrawNT2L9tZh80zekyvjp2Q44GZz/68HeNjuXRrKMZ0fsS2vYZLVKawH3+z+qsY6790NvWxHKvJdLtb4XvCRpdtHSCRmBC7kfe+bTxdaQoXm+/JI++gRGefYIXMJRRDjjm0tbX2qzbMSn4JNyQzSNya8ES9BVJUqTMIs= X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2551; 20:dU4APE3Rd4+vjmh88Ni4XBu7PLvylkaQRa8ZcrcpC3lU21+ahOrjDvThq/nEKAiRTBKlynggp7mIBz0vgGulETburUuYrw4G0fd28M9TP5EpNgMMApXMrZ41JRbQqTQzMUB26VF5LNZVNukRAfaBWEq/Lm3BCer0y+PQ/g9iwf0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2017 11:47:18.8082 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2551 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.1.107 Subject: [Qemu-devel] [PATCH v5 2/4] qcow2: add qcow2_cache_discard 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: kwolf@redhat.com, pbutsykin@virtuozzo.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Whenever l2/refcount table clusters are discarded from the file we can automatically drop unnecessary content of the cache tables. This reduces the chance of eviction useful cache data and eliminates inconsistent data in the cache with the data in the file. Signed-off-by: Pavel Butsykin Reviewed-by: Max Reitz --- block/qcow2-cache.c | 26 ++++++++++++++++++++++++++ block/qcow2-refcount.c | 14 ++++++++++++++ block/qcow2.h | 3 +++ 3 files changed, 43 insertions(+) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index 1d25147392..75746a7f43 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -411,3 +411,29 @@ void qcow2_cache_entry_mark_dirty(BlockDriverState *bs, Qcow2Cache *c, assert(c->entries[i].offset != 0); c->entries[i].dirty = true; } + +void *qcow2_cache_is_table_offset(BlockDriverState *bs, Qcow2Cache *c, + uint64_t offset) +{ + int i; + + for (i = 0; i < c->size; i++) { + if (c->entries[i].offset == offset) { + return qcow2_cache_get_table_addr(bs, c, i); + } + } + return NULL; +} + +void qcow2_cache_discard(BlockDriverState *bs, Qcow2Cache *c, void *table) +{ + int i = qcow2_cache_get_table_idx(bs, c, table); + + assert(c->entries[i].ref == 0); + + c->entries[i].offset = 0; + c->entries[i].lru_counter = 0; + c->entries[i].dirty = false; + + qcow2_cache_table_release(bs, c, i, 1); +} diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index c9b0dcb4f3..8050db4544 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -862,6 +862,20 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, s->set_refcount(refcount_block, block_index, refcount); if (refcount == 0 && s->discard_passthrough[type]) { + void *table; + + table = qcow2_cache_is_table_offset(bs, s->refcount_block_cache, + offset); + if (table != NULL) { + qcow2_cache_put(bs, s->refcount_block_cache, &refcount_block); + qcow2_cache_discard(bs, s->refcount_block_cache, table); + } + + table = qcow2_cache_is_table_offset(bs, s->l2_table_cache, offset); + if (table != NULL) { + qcow2_cache_discard(bs, s->l2_table_cache, table); + } + update_refcount_discard(bs, cluster_offset, s->cluster_size); } } diff --git a/block/qcow2.h b/block/qcow2.h index 96a8d43c17..52c374e9ed 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -649,6 +649,9 @@ int qcow2_cache_get(BlockDriverState *bs, Qcow2Cache *c, uint64_t offset, int qcow2_cache_get_empty(BlockDriverState *bs, Qcow2Cache *c, uint64_t offset, void **table); void qcow2_cache_put(BlockDriverState *bs, Qcow2Cache *c, void **table); +void *qcow2_cache_is_table_offset(BlockDriverState *bs, Qcow2Cache *c, + uint64_t offset); +void qcow2_cache_discard(BlockDriverState *bs, Qcow2Cache *c, void *table); /* qcow2-bitmap.c functions */ int qcow2_check_bitmaps_refcounts(BlockDriverState *bs, BdrvCheckResult *res,