From patchwork Sat Sep 29 09:54:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10620703 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 34DF7112B for ; Sat, 29 Sep 2018 09:56:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F54E2AC67 for ; Sat, 29 Sep 2018 09:56:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F31142AC92; Sat, 29 Sep 2018 09:56:24 +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.7 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 35CD32AC67 for ; Sat, 29 Sep 2018 09:56:23 +0000 (UTC) Received: from localhost ([::1]:50188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6Bz4-0007YW-Vc for patchwork-qemu-devel@patchwork.kernel.org; Sat, 29 Sep 2018 05:56:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6ByJ-0007D6-Ng for qemu-devel@nongnu.org; Sat, 29 Sep 2018 05:55:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6ByF-0002wo-K7 for qemu-devel@nongnu.org; Sat, 29 Sep 2018 05:55:35 -0400 Received: from mail-eopbgr680127.outbound.protection.outlook.com ([40.107.68.127]:20032 helo=NAM04-BN3-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 1g6ByF-0002vh-EU; Sat, 29 Sep 2018 05:55:31 -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=1Ek+7zJXbBu8W9cNTZbXalE9BWICi3NFzBxov+a4o+w=; b=bw6h5s+Rxi9WrrQV2d/2XxDDH/zLlrvw6qRNfScZXHiLf/WsG63J9rTSX6yHjl7GtBwEZQvwd617Iql+hrk1t2SDSsLlZBnsuc3M3XVxxK85eAgiW5yopHW2F7cLZN45Q9DVSMnDsPeeXJP/uHg6iAp+ya1T9wx8ehna/e5Orh8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.22; Sat, 29 Sep 2018 09:55:26 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Sat, 29 Sep 2018 12:54:54 +0300 Message-Id: <20180929095454.32066-1-lbloch@janustech.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: HE1PR05CA0372.eurprd05.prod.outlook.com (2603:10a6:7:94::31) To BN3PR07MB2611.namprd07.prod.outlook.com (2a01:111:e400:c5f0::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4a63a783-105b-4b7d-89aa-08d625f1af8d X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989299)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 3:Txs2HY2D9KcafC0IHC5XVFzkLyqXkciFPyp/uTEPrsY4maKa3sEIXCgYSV+sHf+u5SmA/xqyacGygmArOVrA3hm2V96EkJekV58n3tprz4TxYF5an4Hv/jIKdN09JakKaT0a6M5ivQOCTLkaO/HTcB7k3KhSsoLHhlhvET7wQX9BSSt1T+Tn7zo91ZgMFODn3N/0elU+ra+llXVr7QnLCzr0ZyT6SHPD/A2ik9sc4lWET1T3vFG3qM2OtyZZBUnj; 25:F26Z2J2/U2ZLulYZyal4bO06i6Z22akaCF2vCLxpz/JXc57nxZjBN+tc8Xw6Y7Jvq1dPd37NpNGQewOKYlvAzDNZpQlKSvN1F65UuDDJHq5oUnl6oCY4FPdNW80EVyxzn7bxJhEbCB4US3JmtJuKVfHzVT5+v31Y3kD0bQH1I5IItnpS+9rcKF5BMIDJw5bSdjYXMbPyEKolHEIgamlnztDQns+nkSPczPWojpRB3A9SluXGs+MEa6R4krh0GlKL8VYVxQYlrrPLDTvU8pKHK+o5/l3FOzTZAf2eln8RSfOksWq1fUdn4jGP1REujgJTnJmirdGgl9RnreH1HVzPGQ==; 31:+o7I6F16tuvwjq8fqN1YQbyxYYUZrh0KJXiUQKbyo8Nx9Dfc3lf8IzYV0X9Oo8yHHP0MieRJD3hhQdJdNyDPALa+onOJmZQ9yrNV0j4oj/vz/4b5m99KsG6SN9YRnRFrX8eZXmkSwgm7FQ2PfBwYRcqu467Xm6rOFN+aZpExxh4SbjScfXsBPe3Zsfzd3KItpxnieasmYUxpfeTpXcs8mZlgmYdKIBiA7dcYvnD7iu4= X-MS-TrafficTypeDiagnostic: BN3PR07MB2611: 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)(3231355)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(149066)(150057)(6041310)(20161123564045)(20161123558120)(20161123562045)(2016111802025)(20161123560045)(6043046)(201708071742011)(7699051); SRVR:BN3PR07MB2611; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2611; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2611; 4:axlVxcMI55VKBTgnm+wLJE9rmr0wumXf5MXNGarfXAY4D4dGCh4NhHjsLd9qLOgFJFFQEdgAoPrE3nFznmgdxgx0OOPDoD+QNADZOwyQB3FpNYB7kQhfyKmP2sx8dD8ggEoFX3QVtiCicagflIrfoTO0tEgykJlctGzOX+4LVDtRonYyGOos0K8cujAjFHbFkJ/AQXmq4VMt79/FdXBHSntTL0Y4QYYyCnGiurNDtwH0NqahsRgFRVgQ/ZVKimeAfv/hiCVb8vBBzNdBIFWQJg== X-Forefront-PRVS: 0810818DA0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(396003)(39830400003)(136003)(376002)(346002)(366004)(199004)(189003)(8676002)(47776003)(54906003)(66066001)(2361001)(6666003)(48376002)(6512007)(16526019)(26005)(34290500001)(1857600001)(186003)(486006)(81166006)(86362001)(305945005)(575784001)(52116002)(51416003)(16586007)(7736002)(14444005)(53936002)(956004)(6506007)(316002)(81156014)(8936002)(476003)(2616005)(386003)(2906002)(508600001)(50226002)(6486002)(50466002)(68736007)(1076002)(4326008)(105586002)(106356001)(2351001)(6116002)(3846002)(6916009)(25786009)(107886003)(5660300001)(97736004)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR07MB2611; 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 h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9Hq/aDZcPFvzRw2Zs+5bvPzNPEHKCeKHsCfsH7L/dct0PCx3rCBVWOeqBFiUnusqQEsJWk8edJiH0hmncnIf6mMy1OrW38D04Zmlai5dsS+SHvj/E5YCjxvf+5zX5l8pc9/z9/jLQ==; 5:67bZHP/hkK9CvRsXkqfZStsKXfdSxC3ObTwnS60KFtXcC/UsEcg5u7dWQWdvKZdagzZZ+xbnJNZEhvo7PJ0z080dn641HbaVMA+jAofOJleHLqZaMsgZN9SubDEdpwyvgbAtluZ9nosSocc2mWRLbk2b2FI+8e7TrMZ+8UBHcGo=; 7:nm3p5U3u4egPwgn8fp/2bzmxCX15Gi9ygLiQyz++L20aNPAMe9SRV8D+T8cjva762tboA7T1zeFJ5Aq6/LTKsU9QRw7ajr+NpMuOBlWW87IFlU/iq6WvPSbyTGKNF/yIX5ZmqXZCj1+CzS09Fko8Gr5dqcif0aLMjbjuZYX0JzvEH0DnZasJfL9wtKzp0ooi7Ds3WC1QUEqCxA4F9M1TYghPpUc0MWq55vsrmjBdRV6ehJcWRNWI2ygpWQAgSwfZ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2018 09:55:26.3857 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4a63a783-105b-4b7d-89aa-08d625f1af8d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2611 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.68.127 Subject: [Qemu-devel] [PATCH] qcow2: Fix cache-clean-interval documentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Alberto Garcia , qemu-block@nongnu.org, Max Reitz , Leonid Bloch Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fixing cache-clean-interval documentation following the recent change to a default of 600 seconds on supported plarforms (only Linux currently). Signed-off-by: Leonid Bloch Reviewed-by: Eric Blake --- docs/qcow2-cache.txt | 19 +++++++++---------- qapi/block-core.json | 3 ++- qemu-options.hx | 3 ++- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/qcow2-cache.txt b/docs/qcow2-cache.txt index 59358b816f..1778312e09 100644 --- a/docs/qcow2-cache.txt +++ b/docs/qcow2-cache.txt @@ -202,18 +202,17 @@ Reducing the memory usage It is possible to clean unused cache entries in order to reduce the memory usage during periods of low I/O activity. -The parameter "cache-clean-interval" defines an interval (in seconds). -All cache entries that haven't been accessed during that interval are -removed from memory. +The parameter "cache-clean-interval" defines an interval (in seconds), +affer which all the cache entries that haven't been accessed during it +are removed from memory. Setting this parameter to 0 disables this feature. -This example removes all unused cache entries every 15 minutes: +The following example removes all unused cache entries every 15 minutes: -drive file=hd.qcow2,cache-clean-interval=900 -If unset, the default value for this parameter is 600. Setting it to 0 -disables this feature. +If unset, the default value for this parameter is 600 on platforms which +support this functionality, and is 0 (disabled) on other platforms. -Note that this functionality currently relies on the MADV_DONTNEED -argument for madvise() to actually free the memory. This is a -Linux-specific feature, so cache-clean-interval is not supported in -other systems. +This functionality currently relies on the MADV_DONTNEED argument for +madvise() to actually free the memory. This is a Linux-specific feature, +so cache-clean-interval is not supported on other systems. diff --git a/qapi/block-core.json b/qapi/block-core.json index 46dac23d2f..25b8a0e744 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2895,7 +2895,8 @@ # # @cache-clean-interval: clean unused entries in the L2 and refcount # caches. The interval is in seconds. The default value -# is 600, and 0 disables this feature. (since 2.5) +# is 600 on supporting platforms, and 0 on other +# platforms. 0 disables this feature. (since 2.5) # # @encrypt: Image decryption options. Mandatory for # encrypted images, except when doing a metadata-only diff --git a/qemu-options.hx b/qemu-options.hx index 52d9d9f06d..f139459e80 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -747,7 +747,8 @@ it which is not used for the L2 cache) @item cache-clean-interval Clean unused entries in the L2 and refcount caches. The interval is in seconds. -The default value is 600. Setting it to 0 disables this feature. +The default value is 600 on supporting platforms, and 0 on other platforms. +Setting it to 0 disables this feature. @item pass-discard-request Whether discard requests to the qcow2 device should be forwarded to the data