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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7F261C433EF for ; Fri, 27 May 2022 09:44:52 +0000 (UTC) Received: from localhost ([::1]:59604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuWWZ-0006Fq-Ii for qemu-devel@archiver.kernel.org; Fri, 27 May 2022 05:44:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuWP2-0002n1-ER; Fri, 27 May 2022 05:37:07 -0400 Received: from forwardcorp1o.mail.yandex.net ([2a02:6b8:0:1a2d::193]:35302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuWOv-0005Ct-Bj; Fri, 27 May 2022 05:37:01 -0400 Received: from sas1-3cba3404b018.qloud-c.yandex.net (sas1-3cba3404b018.qloud-c.yandex.net [IPv6:2a02:6b8:c08:bd26:0:640:3cba:3404]) by forwardcorp1o.mail.yandex.net (Yandex) with ESMTP id 622192E118E; Fri, 27 May 2022 12:36:46 +0300 (MSK) Received: from sas1-c73b4b4f4b95.qloud-c.yandex.net (sas1-c73b4b4f4b95.qloud-c.yandex.net [2a02:6b8:c08:12a9:0:640:c73b:4b4f]) by sas1-3cba3404b018.qloud-c.yandex.net (mxbackcorp/Yandex) with ESMTP id 7bwZDaiQjW-ajKOHk27; Fri, 27 May 2022 12:36:46 +0300 X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1653644206; bh=87HDwd5CtCZRhFqsIXSVuxXwtf7rn5FT0EPITpPWNEA=; h=In-Reply-To:From:Cc:To:Subject:Message-ID:References:Date; b=tw7oOKR2Tpht/0LJo+3LM5foPErzDWXd0VR2I9lxdTmK4oiE1syUfnCQaBB4Gt7jl qfsR1gfG+qkBdm/EE94eWnAZXiZCwdxsUQVoskb3JCKUyX0Y+VQdWQaAyVQTH4kyet jxVt/C4Ldt4At6hBMB4nif6sw9AJ2p5ChErGNkh0= Authentication-Results: sas1-3cba3404b018.qloud-c.yandex.net; dkim=pass header.i=@yandex-team.ru Received: from [IPV6:2a02:6b8:b081:b6b0::1:22] (unknown [2a02:6b8:b081:b6b0::1:22]) by sas1-c73b4b4f4b95.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id XUnQnKcWjr-ajJm4He3; Fri, 27 May 2022 12:36:45 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Message-ID: Date: Fri, 27 May 2022 12:36:45 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 1/1] nbd: trace long NBD operations Content-Language: en-US To: "Denis V. Lunev" , qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: Eric Blake , Kevin Wolf , Hanna Reitz , Paolo Bonzini References: <20220527084348.68911-1-den@openvz.org> From: Vladimir Sementsov-Ogievskiy In-Reply-To: <20220527084348.68911-1-den@openvz.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a02:6b8:0:1a2d::193; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1o.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 5/27/22 11:43, Denis V. Lunev wrote: > +++ b/nbd/client-connection.c > @@ -23,6 +23,7 @@ > */ > > #include "qemu/osdep.h" > +#include "trace.h" > > #include "block/nbd.h" > > @@ -210,6 +211,7 @@ static void *connect_thread_func(void *opaque) > object_unref(OBJECT(conn->sioc)); > conn->sioc = NULL; > if (conn->do_retry && !conn->detached) { > + trace_nbd_connect_iteration(timeout); > qemu_mutex_unlock(&conn->mutex); > > sleep(timeout); > diff --git a/nbd/trace-events b/nbd/trace-events > index c4919a2dd5..bdadfdc82d 100644 > --- a/nbd/trace-events > +++ b/nbd/trace-events > @@ -73,3 +73,6 @@ nbd_co_receive_request_decode_type(uint64_t handle, uint16_t type, const char *n > nbd_co_receive_request_payload_received(uint64_t handle, uint32_t len) "Payload received: handle = %" PRIu64 ", len = %" PRIu32 > nbd_co_receive_align_compliance(const char *op, uint64_t from, uint32_t len, uint32_t align) "client sent non-compliant unaligned %s request: from=0x%" PRIx64 ", len=0x%" PRIx32 ", align=0x%" PRIx32 > nbd_trip(void) "Reading request" > + > +# client-connection.c > +nbd_connect_iteration(int in_flight) "timeout %d" timeout is uint64_t, so, it should be "uint64_t timeout" here and %" PRIu64 -- Best regards, Vladimir