From: Hongbo Li <lihongbo22@huawei.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: <muchun.song@linux.dev>, <rostedt@goodmis.org>,
<mhiramat@kernel.org>, <mathieu.desnoyers@efficios.com>,
<linux-mm@kvack.org>, <linux-trace-kernel@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] hugetlbfs: support tracepoint
Date: Thu, 4 Jul 2024 14:40:17 +0800 [thread overview]
Message-ID: <b9160595-bcfe-4ea1-852f-f8189e129cbc@huawei.com> (raw)
In-Reply-To: <ZoYY-sfj5jvs8UpQ@casper.infradead.org>
On 2024/7/4 11:37, Matthew Wilcox wrote:
> On Thu, Jul 04, 2024 at 11:07:03AM +0800, Hongbo Li wrote:
>> + TP_printk("dev = (%d,%d), ino = %lu, dir = %lu, mode = 0%o",
>> + MAJOR(__entry->dev), MINOR(__entry->dev),
>> + (unsigned long) __entry->ino,
>> + (unsigned long) __entry->dir, __entry->mode)
>
> erofs and f2fs are the only two places that print devices like this.
>
> "dev=%d:%d inode=%lx"
>
> Why do we need dir and mode?
Thanks for reviewing!
Here dir and mode are used to track the creation of the directory tree.
>
> Actually, why do we need a tracepoint on alloc_inode at all? What
> does it help us debug, and why does no other filesystem need an
> alloc_inode tracepoint?
>
In fact, f2fs and ext4 have added this tracepoint such as
trace_f2fs_new_inode(in f2fs) and trace_ext4_allocate_inode(in ext4).
This can trace the lifecycle of an inode comprehensively. These
tracepoints are used to debug some closed application scenarios, and
also helping developers to debug the filesystem logic in hugetlbfs.
Thanks,
Hongbo
next prev parent reply other threads:[~2024-07-04 6:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 3:07 [PATCH v2 0/2] Introduce tracepoint for hugetlbfs Hongbo Li
2024-07-04 3:07 ` [PATCH v2 1/2] hugetlbfs: support tracepoint Hongbo Li
2024-07-04 3:37 ` Matthew Wilcox
2024-07-04 6:40 ` Hongbo Li [this message]
2024-07-04 12:56 ` Dave Chinner
2024-07-04 14:13 ` Steven Rostedt
2024-07-04 23:34 ` Dave Chinner
2024-07-05 6:24 ` Hongbo Li
2024-07-04 3:07 ` [PATCH v2 2/2] hugetlbfs: use tracepoints in hugetlbfs functions Hongbo Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9160595-bcfe-4ea1-852f-f8189e129cbc@huawei.com \
--to=lihongbo22@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=muchun.song@linux.dev \
--cc=rostedt@goodmis.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox