Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp510924ybe; Tue, 10 Sep 2019 23:53:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZ8Z/unFCyb9l0lAhfAnOQAXMkY+QjR+/OYQdljWCf1bxRbaYfyIckUlwiYtFhzL+IIXK0 X-Received: by 2002:a17:906:e0d9:: with SMTP id gl25mr28655390ejb.101.1568184819567; Tue, 10 Sep 2019 23:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568184819; cv=none; d=google.com; s=arc-20160816; b=bST1f0SEqnV2z4/lNTbIzrdJwR1hMQsXbniyVEcPKsvIwQhfDJw2fjs+SIUUb4Mm49 kLW0NgkSiP7+3zzaSEfd02oPDEMT7aBtgTOfciy/L4JyMhPjcyuqwDWR647gPEqDLyTA L9lA33ZWqn80mNFB0ThNIvIylMe1a2osJl42LRlcOn76rTcImCFXmMglGbHM3w+c1syS 8SOO9fqz/utMZoz04+SIooYUVdQt2JxwExLSwfFsueQJfwZNymyUXjCTn75o/8X0zWQA jAf1LaWyvCuTweSrjefdrrJSfM079uqAcor6S01IFetOczKibx0GBYIpFoFB15v/6zK2 TVmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=0HeK20yKZgu85ijSijEPK+92+K2806U4Uo39MauWhMU=; b=uRT6LoT+sIia/F6E1WORb+AEtTdBLiaCd3YSUav+jYToPxlPqGG/SSH4cZy3Ed/Eib Exo/TWFhfuTZ6ugB18ig9XF4IgceODaQ8RKK5npbQ7bSA6xj3ZFFQLT57iD3QnCmYEqn 6DyhEbW+fY0cqLB8bJDcp7x+UiiHT54dBnsrgLXeXNTdO3C6eBOarsYeN4nzlAuSKXDG xnrzU3t+cVnb/5T7OeFmbK758ZjoP6EcALcdjANdsbnmbP3os8Jb6rySQt5v/KQNV2K0 JMYXBgWa8UmJJ8b68rHc7piqDS84J9cyaQHOcZG7Rx8X5KwnzZUrnIi8otJR+Ebq2pjK kOsw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ox5si10544704ejb.128.2019.09.10.23.53.06; Tue, 10 Sep 2019 23:53:39 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726657AbfIKGxB (ORCPT + 99 others); Wed, 11 Sep 2019 02:53:01 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:59326 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726390AbfIKGxB (ORCPT ); Wed, 11 Sep 2019 02:53:01 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04391;MF=xiaoguang.wang@linux.alibaba.com;NM=1;PH=DS;RN=2;SR=0;TI=SMTPD_---0Tc2lZS6_1568184771; Received: from 30.5.113.40(mailfrom:xiaoguang.wang@linux.alibaba.com fp:SMTPD_---0Tc2lZS6_1568184771) by smtp.aliyun-inc.com(127.0.0.1); Wed, 11 Sep 2019 14:52:51 +0800 Subject: Re: [PATCH 1/2] jbd2: add new tracepoint jbd2_sleep_on_shadow To: "Theodore Y. Ts'o" Cc: linux-ext4@vger.kernel.org References: <20190902145442.1921-1-xiaoguang.wang@linux.alibaba.com> <20190907162145.GC23683@mit.edu> From: Xiaoguang Wang Message-ID: <5d96e18f-9610-208f-6db3-6a7b6a112400@linux.alibaba.com> Date: Wed, 11 Sep 2019 14:52:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20190907162145.GC23683@mit.edu> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org hi, Thanks for reviewing. > On Mon, Sep 02, 2019 at 10:54:41PM +0800, Xiaoguang Wang wrote: >> Sometimes process will be stalled in "wait_on_bit_io(&bh->b_state, >> BH_Shadow, TASK_UNINTERRUPTIBLE)" for a while, and in order to analyse >> app's latency thoroughly, add a new tracepoint to track this delay. >> >> Trace info likes below: >> fsstress-5068 [008] .... 11007.757543: jbd2_sleep_on_shadow: dev 254,17 sleep 1 >> fsstress-5070 [007] .... 11007.757544: jbd2_sleep_on_shadow: dev 254,17 sleep 2 >> fsstress-5069 [009] .... 11007.757548: jbd2_sleep_on_shadow: dev 254,17 sleep 2 >> fsstress-5067 [011] .... 11007.757569: jbd2_sleep_on_shadow: dev 254,17 sleep 1 >> fsstress-5063 [007] .... 11007.757651: jbd2_sleep_on_shadow: dev 254,17 sleep 2 >> fsstress-5070 [007] .... 11007.757792: jbd2_sleep_on_shadow: dev 254,17 sleep 0 >> fsstress-5071 [011] .... 11007.763493: jbd2_sleep_on_shadow: dev 254,17 sleep 1 >> >> Signed-off-by: Xiaoguang Wang > > 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. Regards, Xiaougang Wang > > For the other patch in this series, milliseconds seems fine, but if we > change the trace info to use "msleep" instead that would be clearer > --- or you could change it to use microseconds as well just for > consistency; I think either would be fine. > > What do you think? > > Cheers, > > - Ted >