Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2083748ybh; Fri, 17 Jul 2020 08:54:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP6VUNvz6tNyM5oNRpJtDrz34oz4wne6mfHQfPGeNpvMBAiUL5D5dy0NbKeditv0BwGxm0 X-Received: by 2002:aa7:d9d7:: with SMTP id v23mr6867369eds.146.1595001279387; Fri, 17 Jul 2020 08:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595001279; cv=none; d=google.com; s=arc-20160816; b=cld2sJ0/gwukI0fUH/IkUbHlip8TczoiHF9ohUkb+v4Sw5809HuUyTLFqQwyQH2WAL l8NLH5wVDOqVW/OXY0L6OlABgz3zj0e2SwrMuLDV2+OVZnt3SAQmDzaWrsO9mHCL3rKn aJsK4rH+y3T6gdTF0cvEjor0aBhz9RSm0gbiuLpU5Jx8aq1kRcRlO9sbvI1lCH7RsRNj iob7SG9GFT4xFn7rccIAC8gjanGdzH7wVNA3jeu44H12Zpx5Bk0nSevf3/nHaaqHEMKM ecD1y792PNd6IKjoySpjix0VmvR68kIiz3Tqj+aqfN+Jh5Atz7YwzpzCDksk89WbSwEk AgEw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WlSre5k+SAudLXZO9TYBT/rKbPL6uadmrrSBRzfBs3E=; b=w/qtH7Zkn0g5nBtxAcuNkXppcz2bgF9fbsJ2KubFHTL0wWzkI62GdlZ7k+8cYxLms2 0ufM04av2YnZkjMmHHswMD23YxmugFblswdo1XiBNpC5BiX7va9ytJhv3a+DfmewqIcM qGN7+eZAXT0Fl71DFgvx4LSLGy/Itclyt0WI7FLZGD03LuE9Y124l8qWjnuNrsSvxgwk Y4FSl7FSDoq96EmfFv3kEwguAI3pbQ3qIfo/j1mPFx+bk+1HFr5jY5PLco9OIYxxQQR2 HWbCxGwBQFMmKaOSb3ytd5ISmPt0DFC6KBVE7EwfzBOUeQc1TUcv/uQvk+tkAWmmEk8X eRCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a8si5709494edr.123.2020.07.17.08.54.09; Fri, 17 Jul 2020 08:54:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbgGQPyF (ORCPT + 99 others); Fri, 17 Jul 2020 11:54:05 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:54478 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726675AbgGQPyD (ORCPT ); Fri, 17 Jul 2020 11:54:03 -0400 Received: from callcc.thunk.org (pool-96-230-252-158.bstnma.fios.verizon.net [96.230.252.158]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 06HFrx8K029545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 11:53:59 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id D114E420C55; Fri, 17 Jul 2020 11:53:58 -0400 (EDT) From: "Theodore Ts'o" To: Ext4 Developers List Cc: Alex Zhuravlev , "Theodore Ts'o" Subject: [PATCH 3/4] ext4: indicate via a block bitmap read is prefetched via a tracepoint Date: Fri, 17 Jul 2020 11:53:51 -0400 Message-Id: <20200717155352.1053040-4-tytso@mit.edu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200717155352.1053040-1-tytso@mit.edu> References: <20200717155352.1053040-1-tytso@mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Modify the ext4_read_block_bitmap_load tracepoint so that it tells us whether a block bitmap is being prefetched. Signed-off-by: Theodore Ts'o --- fs/ext4/balloc.c | 2 +- include/trace/events/ext4.h | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index aaa9ec5212c8..5a2f8837200c 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -494,7 +494,7 @@ ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group, * submit the buffer_head for reading */ set_buffer_new(bh); - trace_ext4_read_block_bitmap_load(sb, block_group); + trace_ext4_read_block_bitmap_load(sb, block_group, ignore_locked); bh->b_end_io = ext4_end_bitmap_read; get_bh(bh); submit_bh(REQ_OP_READ, REQ_META | REQ_PRIO | diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index cc41d692ae8e..cbcd2e1a608d 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h @@ -1312,18 +1312,34 @@ DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, TP_ARGS(sb, group) ); -DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, +DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, TP_PROTO(struct super_block *sb, unsigned long group), TP_ARGS(sb, group) ); -DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, +TRACE_EVENT(ext4_read_block_bitmap_load, + TP_PROTO(struct super_block *sb, unsigned long group, bool prefetch), - TP_PROTO(struct super_block *sb, unsigned long group), + TP_ARGS(sb, group, prefetch), - TP_ARGS(sb, group) + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( __u32, group ) + __field( bool, prefetch ) + + ), + + TP_fast_assign( + __entry->dev = sb->s_dev; + __entry->group = group; + __entry->prefetch = prefetch; + ), + + TP_printk("dev %d,%d group %u prefetch %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->group, __entry->prefetch) ); TRACE_EVENT(ext4_direct_IO_enter, -- 2.24.1