Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3038541ybe; Sun, 8 Sep 2019 05:58:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQa+HPXOySwQ+qRy7Tk9vebN/V1GJH1S6sVLXFOQuSEoc7KKtIqUjcbG7Tw38VHSDIKg91 X-Received: by 2002:a05:6402:1421:: with SMTP id c1mr19253815edx.51.1567947507341; Sun, 08 Sep 2019 05:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567947507; cv=none; d=google.com; s=arc-20160816; b=NflpAf89HAMVXn6mbJMB1B2kmvQ7VJ9T8n/VX9QXeLycH/JIkp8VE2RSK4k+6rwxnd BTh4h5jIwzRoUfUaN+/uCOxLwW8Yecb/GuuW8ScWRe9uecBjws9LmCr7Ta4kSBL+Ja56 2ywgaWPCdrn7Cpu6kUv/tlEDxMC9wu3/GxCkIJUWx8HAWZCs65/+GrFnQ1y/hQ4zREa8 FXGTrPBbuByomLx81+6OgDPM+e/Y0wo5mhSHirXQ7QzDj7NWKrAQo6GpmhHRyZe2eZS7 QeisokyU0TbPx+PrswuVY4xrNrbuVaEMsvU/luJd3JUnQ6goTaPsiZlT86IaacW3NdTT LN7w== 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=PpEitMGfnme55D6829Y5Tcggb1GH7zY6j+R0PR96I4c=; b=WBxlwjcVjtilcblUR3+GOXQLggf1CKYLpzi6upDlMhOujJ4UZHIE5ZBI8KYfQPamOT +mVEBZdMfruhghzI98qgNABB0I6mIA0wcpvcyBzSpBWj7KNLdu3JhFg15K/0qXEfYwVd qolsCYaMfpAt4/v6JDyMEVzzimztVS1IOehjTpzR6IXAu0rNKc5LUcEGoatuGVbjqiVf zKP9coClyMHqYRFrohouTHf6Re6FEzQyaS0EVKf75q2X1JwDG2mgPtZ0lUOKEbndRM+d NxAFu9N6u8WGP9IIQxoIBWIHIeXeilkmaJ84/DzALYqbLe6L6U7nM2afnJf66Y8z9Zie 78cA== 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 v20si5634478ejw.312.2019.09.08.05.58.01; Sun, 08 Sep 2019 05:58:27 -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 S1727497AbfIHIw2 (ORCPT + 99 others); Sun, 8 Sep 2019 04:52:28 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36720 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727538AbfIHIw1 (ORCPT ); Sun, 8 Sep 2019 04:52:27 -0400 Received: from callcc.thunk.org (110.8.30.213.rev.vodafone.pt [213.30.8.110]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x888qHDE025742 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 8 Sep 2019 04:52:19 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id F03B9420848; Sat, 7 Sep 2019 12:21:45 -0400 (EDT) Date: Sat, 7 Sep 2019 12:21:45 -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: <20190907162145.GC23683@mit.edu> References: <20190902145442.1921-1-xiaoguang.wang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190902145442.1921-1-xiaoguang.wang@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 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. 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