Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp935291ybe; Wed, 11 Sep 2019 07:02:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTTmDO0PJ3yKIzeTc2CwBr4kJelw/w3O8VoSif7hWPgCnPDzroQ5Z5pHL9CN1KqFOM96wK X-Received: by 2002:a1c:770c:: with SMTP id t12mr4018741wmi.91.1568210527612; Wed, 11 Sep 2019 07:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568210527; cv=none; d=google.com; s=arc-20160816; b=N/eCOmGto9sQBL5y+ThG1p/siAI43X13CrmDKPPomjvJIc+iBS3zQfr4WqRAmpXUHF PPYgzDFZb2QAgXAik+GOoGYNSIELwHicXH/m7Rr3hToC0L3+n3tXTBeDUkYZTX4IZXrJ Q1TVIhDldOXjF799hXKz9D4FF/AKNwZDYY61nKuEeJmuWOSXxxnMafHnx3hoxFV4RSDt VDYtJ/NFGjeyFwn+HecmtBCNeiFV191J3vt8s8FR7PzFIxOYse0Avr2lnreOHIhoZA+a fgzQa5yPQlL5gaRpYSrP3cXFtRI7hRcnv5kqpzOGFCLEuORCriA8j15wxyUDiSPhDJHy kgmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JI+QGHDqVymqFOtggv2fGbbo0u/5dpZOWskewAuTHxI=; b=CMfvAfl/Fol9pY/HbFocpSXHEY+WgESx49wS1i7EDUutH4uvXpfsPLIQaRNSg8+woD Kfu32AbmEKVCSJNjuwrISVyvE3wo56ZK8f8Sc+IMQmWI/ria0k7ds/qfIdnAmHXs9EIu UvNYIaEEmdq6iNomLEVQRpScWw9oUERfbvpHLeFCY8njRcyVN1bZ4GrtfPYXg+9Zg+cS uX9/efhPEFeP0Nr4tEkjUtfB4/aVbwdvT6ptpQIXNvQvjKFEXiU/oEwu3GREVQFy2olR kHXQkKEBVwWkvLmpsejhLSKshBfp3XuN/sWgJuD66i45WRblX4+cCGQoK44iLF7C7Wan wOsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k19si10149297eds.71.2019.09.11.07.01.32; Wed, 11 Sep 2019 07:02:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726525AbfIKOAF (ORCPT + 99 others); Wed, 11 Sep 2019 10:00:05 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36095 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726058AbfIKOAF (ORCPT ); Wed, 11 Sep 2019 10:00:05 -0400 Received: from callcc.thunk.org (38.85.69.148.rev.vodafone.pt [148.69.85.38] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x8BDvsps004681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 11 Sep 2019 09:57:58 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id C6DC242049E; Wed, 11 Sep 2019 09:57:07 -0400 (EDT) Date: Wed, 11 Sep 2019 09:57:07 -0400 From: "Theodore Y. Ts'o" To: Xiaoguang Wang Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH 1/2] jbd2: add new tracepoint jbd2_sleep_on_shadow Message-ID: <20190911135707.GC2740@mit.edu> References: <20190902145442.1921-1-xiaoguang.wang@linux.alibaba.com> <20190907162145.GC23683@mit.edu> <5d96e18f-9610-208f-6db3-6a7b6a112400@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5d96e18f-9610-208f-6db3-6a7b6a112400@linux.alibaba.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Sep 11, 2019 at 02:52:51PM +0800, Xiaoguang Wang wrote: > > I think maybe it might be better to use units of microseconds and then > > change sleep to usleep so the units are clear? This is a spinlock, so > > it should be quick. > > Sorry, I may not quite understand you, do you mean that milliseconds is not precise, so > should use microseconds? For these two patches, they do not use usleep or msleep to do > real sleep work, they just record the duration which process takes to wait bh_shadow flag > to be cleared or transaction to be unlocked. Apologies, I should have been clear enough. Yes, my concern that milliseconds might not be fine-grained enough. The sample results which you showed had values of 2ms, 1ms, and 0ms. And the single 0ms result in particular raised the concern that we should use a microseconds instead of milliseconds. In fact, instead of "sleep", maybe "latency(us)" or "latency(ms)" would be a better label? Regards, - Ted