Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3143296rwe; Sun, 16 Apr 2023 12:45:31 -0700 (PDT) X-Google-Smtp-Source: AKy350b1z+QArp3fM0GAqxb17h4Z6NAIkEs6V/yoLQHhMFcS7+XS98khq8+TrwqhVTfWSHx8zbSo X-Received: by 2002:a05:6a00:892:b0:627:6328:79f1 with SMTP id q18-20020a056a00089200b00627632879f1mr17450848pfj.34.1681674331528; Sun, 16 Apr 2023 12:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681674331; cv=none; d=google.com; s=arc-20160816; b=FvstVjb8OMu0tc8fUVwk74v1H3Mpmtgf9fjRAdihoS3MrcWczEeuZJwUw0KBZiu0YE u5ZSa7EzKCO/bImiIEwfmheHRDKK+SYWa92we5Na4AiTqan8kp8rXiuOxDH24+8dUSLF 5GnJYHRI+H4W3KuNVX+V7ZBiLCOx8Hf26KxhEOQjuag2f7scrl9tV9xEKWbWco6VNgEk yvHLXOKvHGDUjT8XLnDs1QZrM81nvKwl0DhPnSevxtnciL7ewJOzMadlRQVsZyhQ/w97 L0UAGDw1CcoXSa39QByohjUBrEp8vV3KxpT/Ns69BCllbp3PtbG79mCXXwjTVgd7PHvK 0ypQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=D7A88ilqY4lEnHOcnoi2q4b4ArbBIYT1MIBWlwVd/98=; b=MPzYpNY0JCatJB9UWwqm2Y+etA06VuaLlRg9p7k1aO3RZwZeBuHQ8RQ/k2P55+Xd0w Ued2ZN7ZrQi4af1j+UyyN/Tdj0gzgGKCsYStCSafwWS2NgLAHFH7ANjfs0VlfOVKaBBQ CcETf0hcPO9nkdYYthnx9oV4Dzb7OUee8ItytkABnlptjyjSh28ePPxjbR+IxWLY7fhu yC8j96lz2CKXyUpkKrOf7NC6k2r2yFV0MC+m4ysAW/GG8co0pOFenr/JMUWiLk/BBayt 3CFWzX0yYEJ/d4UI00vu6nvdp4HCjvsDgE1Wm0I6tqOUQhh2ozBUWIxJY8d/VnMS1RLn I4ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=NnWpoLEd; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020aa7984a000000b0062a56e86099si9949434pfq.270.2023.04.16.12.45.04; Sun, 16 Apr 2023 12:45:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=NnWpoLEd; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229564AbjDPTj5 (ORCPT + 99 others); Sun, 16 Apr 2023 15:39:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjDPTj4 (ORCPT ); Sun, 16 Apr 2023 15:39:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 807852136 for ; Sun, 16 Apr 2023 12:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=D7A88ilqY4lEnHOcnoi2q4b4ArbBIYT1MIBWlwVd/98=; b=NnWpoLEdfYCL8TBNTpJYv84Olo vmB2Y0oiff1oK9MOb56qhWdbezlyGeFNxo+wo9Ll+Y7OKvoFQI0P/PQ1lXuWBsMMDBo5kt/FSS3GT j3/kOqQNZaP9djHswnx7amukBw4y9pNlbapLD7ooz71FBhA1IxIlsVFw+UX9/UpHSxLyQz2omgAx6 mAbRUgR5mXYt7f/9CRLrNgeVDKgcJhZN6W3/bmeEYTw7SCBg8WLDqCTj2d1IhmNebOZLLBzMkCzsz LdEg3lgwJelJJTv4pJ8IEtnMYer2nkHnqY7K5sr3Kmni1nXp7hhO2G99NOQJBY4WvwyVcMyt6Zcs5 t6Nmgf8A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1po8E3-00Ac9A-EX; Sun, 16 Apr 2023 19:39:51 +0000 Date: Sun, 16 Apr 2023 20:39:51 +0100 From: Matthew Wilcox To: "Ritesh Harjani (IBM)" Cc: linux-ext4@vger.kernel.org, Jan Kara , Ojaswin Mujoo , Disha Goel Subject: Re: [RFCv1 2/4] ext4: Change remaining tracepoints to use folio Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Apr 17, 2023 at 12:01:51AM +0530, Ritesh Harjani (IBM) wrote: > est4_readpage() is converted to ext4_read_folio() hence change the > related tracepoint from trace_ext4_readpage(page) to > trace_ext4_read_folio(folio). > > Do the same for trace_ext4_releasepage(page) to > trace_ext4_release_folio(folio) Thanks for doing this! Reviewed-by: Matthew Wilcox (Oracle) One possible enhancement is that each fo these functions does folio->mapping->host already. We could change ext4__folio_op to take (inode, folio) instead of just folio and simplify/remove some dereferences. > Signed-off-by: Ritesh Harjani (IBM) > --- > fs/ext4/inode.c | 4 ++-- > include/trace/events/ext4.h | 26 +++++++++++++------------- > 2 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > index 6d628d6c0847..5bb141288b1b 100644 > --- a/fs/ext4/inode.c > +++ b/fs/ext4/inode.c > @@ -3157,7 +3157,7 @@ static int ext4_read_folio(struct file *file, struct folio *folio) > int ret = -EAGAIN; > struct inode *inode = folio->mapping->host; > > - trace_ext4_readpage(&folio->page); > + trace_ext4_read_folio(folio); > > if (ext4_has_inline_data(inode)) > ret = ext4_readpage_inline(inode, folio); > @@ -3218,7 +3218,7 @@ static bool ext4_release_folio(struct folio *folio, gfp_t wait) > { > journal_t *journal = EXT4_JOURNAL(folio->mapping->host); > > - trace_ext4_releasepage(&folio->page); > + trace_ext4_release_folio(folio); > > /* Page has dirty journalled data -> cannot release */ > if (folio_test_checked(folio)) > diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h > index ebccf6a6aa1b..a9415f1c68ec 100644 > --- a/include/trace/events/ext4.h > +++ b/include/trace/events/ext4.h > @@ -560,10 +560,10 @@ TRACE_EVENT(ext4_writepages_result, > (unsigned long) __entry->writeback_index) > ); > > -DECLARE_EVENT_CLASS(ext4__page_op, > - TP_PROTO(struct page *page), > +DECLARE_EVENT_CLASS(ext4__folio_op, > + TP_PROTO(struct folio *folio), > > - TP_ARGS(page), > + TP_ARGS(folio), > > TP_STRUCT__entry( > __field( dev_t, dev ) > @@ -573,29 +573,29 @@ DECLARE_EVENT_CLASS(ext4__page_op, > ), > > TP_fast_assign( > - __entry->dev = page->mapping->host->i_sb->s_dev; > - __entry->ino = page->mapping->host->i_ino; > - __entry->index = page->index; > + __entry->dev = folio->mapping->host->i_sb->s_dev; > + __entry->ino = folio->mapping->host->i_ino; > + __entry->index = folio->index; > ), > > - TP_printk("dev %d,%d ino %lu page_index %lu", > + TP_printk("dev %d,%d ino %lu folio_index %lu", > MAJOR(__entry->dev), MINOR(__entry->dev), > (unsigned long) __entry->ino, > (unsigned long) __entry->index) > ); > > -DEFINE_EVENT(ext4__page_op, ext4_readpage, > +DEFINE_EVENT(ext4__folio_op, ext4_read_folio, > > - TP_PROTO(struct page *page), > + TP_PROTO(struct folio *folio), > > - TP_ARGS(page) > + TP_ARGS(folio) > ); > > -DEFINE_EVENT(ext4__page_op, ext4_releasepage, > +DEFINE_EVENT(ext4__folio_op, ext4_release_folio, > > - TP_PROTO(struct page *page), > + TP_PROTO(struct folio *folio), > > - TP_ARGS(page) > + TP_ARGS(folio) > ); > > DECLARE_EVENT_CLASS(ext4_invalidate_folio_op, > -- > 2.39.2 >