From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BBFADCCF9EE for ; Wed, 29 Oct 2025 04:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:MIME-Version:References: Message-ID:To:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TjxJwUB6T7BHEGo2Pyc20Fzk7Gbj5bbxaUqZPgHPpi8=; b=ma8/rSiYDRh/rk9zK2DlmkH0lZ 0MVVN6j03vP6Zh9RTflf7MvwfvC0gi8Uhb6kbv12YvgrsI2ZGraGPcTDDF5owb59+Kd47wzdhuXzk gIQbiYnn44zXcw/x0F+qBvIFRf8RSz8jZ7mz5nZHNju2cYqTqWzn5lbg9zTi8HAlz8dc=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vDxlm-0007YR-4A; Wed, 29 Oct 2025 04:26:46 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vDxll-0007YL-Bf for linux-f2fs-devel@lists.sourceforge.net; Wed, 29 Oct 2025 04:26:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Gtd+6tByowlbxeHpwqI6g01haHKdtkBEh48BAwQ/NrQ=; b=bE11AWWEjL9+bhatOVFgh7hCKc hdeDXTOJpxd8QVgXiqH8J8oWkoQi5NuR12VYaQuasTfQB3JyzjUpau6/OfZWxBVwbq4xPNPXhQfzW LtXQly3fKLJvgpbJFcl1CjzuYi6cJCqTyQnVikXJBZaNukMKxyFVyhekpUr3GuE+y840=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Gtd+6tByowlbxeHpwqI6g01haHKdtkBEh48BAwQ/NrQ=; b=BUeY5ytp5KtK2WtyDmMThBYCjk ulI7r8Ru4fnL0Zy03IIlsxKTpyYhOsAHVUibBw6atvfWNbSumxzzCgpOTHOxKmahjTxtG7Mx+Jrm7 bGVMMFfCU7vNNQaQdp8A7B7KyQmaelAbAK3ndWlRuvY+LiUAU8pUrn8wtiiw1EL6DPzo=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vDxlk-0000hk-QR for linux-f2fs-devel@lists.sourceforge.net; Wed, 29 Oct 2025 04:26:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 026B260505; Wed, 29 Oct 2025 04:26:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F561C4CEF7; Wed, 29 Oct 2025 04:26:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761711993; bh=pNrkVZRg0qtgUOiit6EQFAAv9auGuKi23YsrTYy0s+Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OgRjpogVTcQB5uIUkngmqJrKUREu27UwjCGfWj9EqxnCWz4+6uYJn/YOM1C3lTNvY YYdp5rjFoUTgyaLzH13AQjjAXuslgnCBpYdnnxmWnbMzJ8ZljIr7Eeq2s9lou89a+G Q8QL9YY5jxQ0zetYJiVSfVZJDWiBkqCy9pguXk+20k+vf0ygAcKNa0B2WWxMDd2YDA +oD4lLqeysMTNYEr/pzh1InWsydeR9Whe0yxoDRjLBxCv9HUFxg6Lf9GZ+hAgP9n2J W1eYT8j16Xb6bGRGclP2sd5BHD2ex+YLx0xyjus/NMh12/6lCVdMaXbnbsHleqaLTN APi9oHqALojCw== Date: Wed, 29 Oct 2025 04:26:31 +0000 To: Chao Yu Message-ID: References: <20251028195444.3181203-1-jaegeuk@kernel.org> <81602674-b9f4-4ab2-91f5-0afc762e7cc6@kernel.org> <7040b501-6e25-42da-bda0-a15614a80d5d@gmail.com> <490569af-8e87-4cea-81dc-3bc9f59aa2b4@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <490569af-8e87-4cea-81dc-3bc9f59aa2b4@kernel.org> X-Headers-End: 1vDxlk-0000hk-QR Subject: Re: [f2fs-dev] [PATCH] f2fs: add fadvise tracepoint X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jaegeuk Kim via Linux-f2fs-devel Reply-To: Jaegeuk Kim Cc: Yongpeng Yang , linux-kernel@vger.kernel.org, Yongpeng Yang , linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 10/29, Chao Yu wrote: > On 10/29/25 11:13, Yongpeng Yang wrote: > > On 10/29/25 10:06, Chao Yu via Linux-f2fs-devel wrote: > >> On 10/29/25 03:54, Jaegeuk Kim via Linux-f2fs-devel wrote: > >>> This adds a tracepoint in the fadvise call path. > >>> > >>> Signed-off-by: Jaegeuk Kim > >>> --- > >>> =A0 fs/f2fs/file.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0 2 ++ > >>> =A0 include/trace/events/f2fs.h | 32 ++++++++++++++++++++++++++++++++ > >>> =A0 2 files changed, 34 insertions(+) > >>> > >>> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > >>> index 6d42e2d28861..4a81089c5df3 100644 > >>> --- a/fs/f2fs/file.c > >>> +++ b/fs/f2fs/file.c > >>> @@ -5288,6 +5288,8 @@ static int f2fs_file_fadvise(struct file *filp,= loff_t offset, loff_t len, > >>> =A0=A0=A0=A0=A0 struct inode *inode =3D file_inode(filp); > >>> =A0=A0=A0=A0=A0 int err; > >>> =A0 +=A0=A0=A0 trace_f2fs_fadvise(inode, offset, len, advice); > >>> + > >>> =A0=A0=A0=A0=A0 if (advice =3D=3D POSIX_FADV_SEQUENTIAL) { > >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0 if (S_ISFIFO(inode->i_mode)) > >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return -ESPIPE; > >>> diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h > >>> index edbbd869078f..b7f5317b5980 100644 > >>> --- a/include/trace/events/f2fs.h > >>> +++ b/include/trace/events/f2fs.h > >>> @@ -586,6 +586,38 @@ TRACE_EVENT(f2fs_file_write_iter, > >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0 __entry->ret) > >>> =A0 ); > >>> =A0 +TRACE_EVENT(f2fs_fadvise, > >>> + > >>> +=A0=A0=A0 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, i= nt advice), > >>> + > >>> +=A0=A0=A0 TP_ARGS(inode, offset, len, advice), > >>> + > >>> +=A0=A0=A0 TP_STRUCT__entry( > >>> +=A0=A0=A0=A0=A0=A0=A0 __field(dev_t,=A0=A0=A0 dev) > >>> +=A0=A0=A0=A0=A0=A0=A0 __field(ino_t,=A0=A0=A0 ino) > >>> +=A0=A0=A0=A0=A0=A0=A0 __field(loff_t, size) > >>> +=A0=A0=A0=A0=A0=A0=A0 __field(loff_t,=A0=A0=A0 offset) > >>> +=A0=A0=A0=A0=A0=A0=A0 __field(loff_t,=A0=A0=A0 len) > >>> +=A0=A0=A0=A0=A0=A0=A0 __field(int,=A0=A0=A0 advice) > >>> +=A0=A0=A0 ), > >>> + > >>> +=A0=A0=A0 TP_fast_assign( > >>> +=A0=A0=A0=A0=A0=A0=A0 __entry->dev=A0=A0=A0 =3D inode->i_sb->s_dev; > >>> +=A0=A0=A0=A0=A0=A0=A0 __entry->ino=A0=A0=A0 =3D inode->i_ino; > >>> +=A0=A0=A0=A0=A0=A0=A0 __entry->size=A0=A0=A0 =3D inode->i_size; > >> > >> __entry->size =3D i_size_read(inode)? > >> > >> Thanks, > >> > > The other "__entry->size =3D inode->i_size;" in include/trace/events/f2= fs.h also need to be updated? > = > Yeah, Yongpeng, I noticed that and fixed them right after reply: > = > https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/commit/?h= =3Dbugfix/common&id=3Dffd21bf791143957f6ff1fc14d7dbd6e8466b320 Please post the above patch separately. :) > = > Thanks for your reminder. :) > = > Thanks, > = > > = > >>> +=A0=A0=A0=A0=A0=A0=A0 __entry->offset=A0=A0=A0 =3D offset; > >>> +=A0=A0=A0=A0=A0=A0=A0 __entry->len=A0=A0=A0 =3D len; > >>> +=A0=A0=A0=A0=A0=A0=A0 __entry->advice=A0=A0=A0 =3D advice; > >>> +=A0=A0=A0 ), > >>> + > >>> +=A0=A0=A0 TP_printk("dev =3D (%d,%d), ino =3D %lu, i_size =3D %lld o= ffset:%llu, len:%llu, advise:%d", > >>> +=A0=A0=A0=A0=A0=A0=A0 show_dev_ino(__entry), > >>> +=A0=A0=A0=A0=A0=A0=A0 (unsigned long long)__entry->size, > >>> +=A0=A0=A0=A0=A0=A0=A0 __entry->offset, > >>> +=A0=A0=A0=A0=A0=A0=A0 __entry->len, > >>> +=A0=A0=A0=A0=A0=A0=A0 __entry->advice) > >>> +); > >>> + > >>> =A0 TRACE_EVENT(f2fs_map_blocks, > >>> =A0=A0=A0=A0=A0 TP_PROTO(struct inode *inode, struct f2fs_map_blocks = *map, int flag, > >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int ret), > >> > >> > >> > >> _______________________________________________ > >> Linux-f2fs-devel mailing list > >> Linux-f2fs-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel > > = _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28B902F549E for ; Wed, 29 Oct 2025 04:26:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761711994; cv=none; b=k1kgYms6v68JfNOyddipp+R6sS5HdlF0FeByGg5k5hYjIS3fbRKi2idIeTWh9weZg6RNzDQvLFGim8sMYGz03CwgyuFap3E21mEc7rfNCruUznDLGjm3YKZBi36luOALFq906Q26PRM6UjLtyPTowlNc44/ddvIvvXMTSkmfF40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761711994; c=relaxed/simple; bh=pNrkVZRg0qtgUOiit6EQFAAv9auGuKi23YsrTYy0s+Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hIwy4H+fvVKLT05v/o9kWgKLX759CNzEO5n4BTMsr4VvnnTM9XuwoN8kPchlzpuBYiQ7lv6D+/aoT/jtv/zz++PwLb4C8u5moClv+Oi4Vs859y7ZIWcwW50k6BzUwRwCM1wdaejonwp9hTDRcWhjJyGjpq2kDPu/N5ney6ocjdg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OgRjpogV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OgRjpogV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F561C4CEF7; Wed, 29 Oct 2025 04:26:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761711993; bh=pNrkVZRg0qtgUOiit6EQFAAv9auGuKi23YsrTYy0s+Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OgRjpogVTcQB5uIUkngmqJrKUREu27UwjCGfWj9EqxnCWz4+6uYJn/YOM1C3lTNvY YYdp5rjFoUTgyaLzH13AQjjAXuslgnCBpYdnnxmWnbMzJ8ZljIr7Eeq2s9lou89a+G Q8QL9YY5jxQ0zetYJiVSfVZJDWiBkqCy9pguXk+20k+vf0ygAcKNa0B2WWxMDd2YDA +oD4lLqeysMTNYEr/pzh1InWsydeR9Whe0yxoDRjLBxCv9HUFxg6Lf9GZ+hAgP9n2J W1eYT8j16Xb6bGRGclP2sd5BHD2ex+YLx0xyjus/NMh12/6lCVdMaXbnbsHleqaLTN APi9oHqALojCw== Date: Wed, 29 Oct 2025 04:26:31 +0000 From: Jaegeuk Kim To: Chao Yu Cc: Yongpeng Yang , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Yongpeng Yang Subject: Re: [f2fs-dev] [PATCH] f2fs: add fadvise tracepoint Message-ID: References: <20251028195444.3181203-1-jaegeuk@kernel.org> <81602674-b9f4-4ab2-91f5-0afc762e7cc6@kernel.org> <7040b501-6e25-42da-bda0-a15614a80d5d@gmail.com> <490569af-8e87-4cea-81dc-3bc9f59aa2b4@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <490569af-8e87-4cea-81dc-3bc9f59aa2b4@kernel.org> On 10/29, Chao Yu wrote: > On 10/29/25 11:13, Yongpeng Yang wrote: > > On 10/29/25 10:06, Chao Yu via Linux-f2fs-devel wrote: > >> On 10/29/25 03:54, Jaegeuk Kim via Linux-f2fs-devel wrote: > >>> This adds a tracepoint in the fadvise call path. > >>> > >>> Signed-off-by: Jaegeuk Kim > >>> --- > >>>   fs/f2fs/file.c              |  2 ++ > >>>   include/trace/events/f2fs.h | 32 ++++++++++++++++++++++++++++++++ > >>>   2 files changed, 34 insertions(+) > >>> > >>> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > >>> index 6d42e2d28861..4a81089c5df3 100644 > >>> --- a/fs/f2fs/file.c > >>> +++ b/fs/f2fs/file.c > >>> @@ -5288,6 +5288,8 @@ static int f2fs_file_fadvise(struct file *filp, loff_t offset, loff_t len, > >>>       struct inode *inode = file_inode(filp); > >>>       int err; > >>>   +    trace_f2fs_fadvise(inode, offset, len, advice); > >>> + > >>>       if (advice == POSIX_FADV_SEQUENTIAL) { > >>>           if (S_ISFIFO(inode->i_mode)) > >>>               return -ESPIPE; > >>> diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h > >>> index edbbd869078f..b7f5317b5980 100644 > >>> --- a/include/trace/events/f2fs.h > >>> +++ b/include/trace/events/f2fs.h > >>> @@ -586,6 +586,38 @@ TRACE_EVENT(f2fs_file_write_iter, > >>>           __entry->ret) > >>>   ); > >>>   +TRACE_EVENT(f2fs_fadvise, > >>> + > >>> +    TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int advice), > >>> + > >>> +    TP_ARGS(inode, offset, len, advice), > >>> + > >>> +    TP_STRUCT__entry( > >>> +        __field(dev_t,    dev) > >>> +        __field(ino_t,    ino) > >>> +        __field(loff_t, size) > >>> +        __field(loff_t,    offset) > >>> +        __field(loff_t,    len) > >>> +        __field(int,    advice) > >>> +    ), > >>> + > >>> +    TP_fast_assign( > >>> +        __entry->dev    = inode->i_sb->s_dev; > >>> +        __entry->ino    = inode->i_ino; > >>> +        __entry->size    = inode->i_size; > >> > >> __entry->size = i_size_read(inode)? > >> > >> Thanks, > >> > > The other "__entry->size = inode->i_size;" in include/trace/events/f2fs.h also need to be updated? > > Yeah, Yongpeng, I noticed that and fixed them right after reply: > > https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/commit/?h=bugfix/common&id=ffd21bf791143957f6ff1fc14d7dbd6e8466b320 Please post the above patch separately. :) > > Thanks for your reminder. :) > > Thanks, > > > > >>> +        __entry->offset    = offset; > >>> +        __entry->len    = len; > >>> +        __entry->advice    = advice; > >>> +    ), > >>> + > >>> +    TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld offset:%llu, len:%llu, advise:%d", > >>> +        show_dev_ino(__entry), > >>> +        (unsigned long long)__entry->size, > >>> +        __entry->offset, > >>> +        __entry->len, > >>> +        __entry->advice) > >>> +); > >>> + > >>>   TRACE_EVENT(f2fs_map_blocks, > >>>       TP_PROTO(struct inode *inode, struct f2fs_map_blocks *map, int flag, > >>>            int ret), > >> > >> > >> > >> _______________________________________________ > >> Linux-f2fs-devel mailing list > >> Linux-f2fs-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel > >