From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84911C433E0 for ; Mon, 10 Aug 2020 10:16:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57BA7206C3 for ; Mon, 10 Aug 2020 10:16:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57BA7206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=openvz.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k54rH-0007xn-JW for qemu-devel@archiver.kernel.org; Mon, 10 Aug 2020 06:16:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k54pW-0004zs-04; Mon, 10 Aug 2020 06:14:58 -0400 Received: from relay.sw.ru ([185.231.240.75]:50172 helo=relay3.sw.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k54pT-0007eJ-4i; Mon, 10 Aug 2020 06:14:57 -0400 Received: from [192.168.15.33] (helo=iris.lishka.ru) by relay3.sw.ru with esmtp (Exim 4.93) (envelope-from ) id 1k54pD-0001FY-Cr; Mon, 10 Aug 2020 13:14:39 +0300 From: "Denis V. Lunev" To: qemu-block@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 3/3] block: enable long IO requests report by default Date: Mon, 10 Aug 2020 13:14:47 +0300 Message-Id: <20200810101447.7380-4-den@openvz.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200810101447.7380-1-den@openvz.org> References: <20200810101447.7380-1-den@openvz.org> Received-SPF: pass client-ip=185.231.240.75; envelope-from=den@openvz.org; helo=relay3.sw.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/10 06:14:49 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "Denis V. Lunev" , Vladimir Sementsov-Ogievskiy , Stefan Hajnoczi , Max Reitz Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Latency threshold is set to 10 seconds following guest request timeout on legacy storage controller. Signed-off-by: Denis V. Lunev CC: Vladimir Sementsov-Ogievskiy CC: Stefan Hajnoczi CC: Kevin Wolf CC: Max Reitz --- blockdev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 66158d1292..733fdd36da 100644 --- a/blockdev.c +++ b/blockdev.c @@ -622,8 +622,13 @@ static BlockBackend *blockdev_init(const char *file, QDict *bs_opts, bs->detect_zeroes = detect_zeroes; + /* + * Set log threshold to 10 seconds. Timeout choosen by observation + * of the guest behavior with legacy storage controllers. Linux + * could remount FS read-only if journal write takes this time. + */ block_acct_setup(blk_get_stats(blk), account_invalid, account_failed, - qemu_opt_get_number(opts, "latency-log-threshold", 0)); + qemu_opt_get_number(opts, "latency-log-threshold", 10000)); if (!parse_stats_intervals(blk_get_stats(blk), interval_list, errp)) { blk_unref(blk); -- 2.17.1