lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 10 Mar 2022 22:37:31 +0530
From:   Ritesh Harjani <riteshh@...ux.ibm.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-ext4@...r.kernel.org, Jan Kara <jack@...e.cz>,
        "Theodore Ts'o" <tytso@....edu>,
        Harshad Shirwadkar <harshadshirwadkar@...il.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 00/10] ext4: Improve FC trace events

On 22/03/10 11:05AM, Steven Rostedt wrote:
> On Thu, 10 Mar 2022 21:28:54 +0530
> Ritesh Harjani <riteshh@...ux.ibm.com> wrote:
>
> > Note:- I still couldn't figure out how to expose EXT4_FC_REASON_MAX in patch-2
> > which (I think) might be (only) needed by trace-cmd or perf record for trace_ext4_fc_stats.
> > But it seems "cat /sys/kernel/debug/tracing/trace_pipe" gives the right output
> > for ext4_fc_stats trace event (as shown below).
> >
> > So with above reasoning, do you think we should take these patches in?
> > And we can later see how to provide EXT4_FC_REASON_MAX definition available to
> > libtraceevent?
>
> I don't see EXT4_FC_REASON_MAX being used in the TP_printk(). If it isn't
> used there, it doesn't need to be exposed. Or did I miss something?

I was mentioning about EXT4_FC_REASON_MAX used in TP_STRUCT__entry.
When I hard code EXT4_FC_REASON_MAX to 9 in TP_STRUCT__entry, I could
see proper values using trace-cmd. Otherwise I see all 0 (when using trace-cmd
or perf record).

+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__array(unsigned int, fc_ineligible_rc, EXT4_FC_REASON_MAX)

Should we anyway hard code this to 9. Since we are anyway printing all the
9 elements of array values individually.

+	TP_printk("dev %d,%d fc ineligible reasons:\n"
+		  "%s:%u, %s:%u, %s:%u, %s:%u, %s:%u, %s:%u, %s:%u, %s:%u, %s:%u "
+		  "num_commits:%lu, ineligible: %lu, numblks: %lu",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  FC_REASON_NAME_STAT(EXT4_FC_REASON_XATTR),
+		  FC_REASON_NAME_STAT(EXT4_FC_REASON_CROSS_RENAME),
+		  FC_REASON_NAME_STAT(EXT4_FC_REASON_JOURNAL_FLAG_CHANGE),
+		  FC_REASON_NAME_STAT(EXT4_FC_REASON_NOMEM),
+		  FC_REASON_NAME_STAT(EXT4_FC_REASON_SWAP_BOOT),
+		  FC_REASON_NAME_STAT(EXT4_FC_REASON_RESIZE),
+		  FC_REASON_NAME_STAT(EXT4_FC_REASON_RENAME_DIR),
+		  FC_REASON_NAME_STAT(EXT4_FC_REASON_FALLOC_RANGE),
+		  FC_REASON_NAME_STAT(EXT4_FC_REASON_INODE_JOURNAL_DATA),
+		  __entry->fc_commits, __entry->fc_ineligible_commits,
+		  __entry->fc_numblks)


Thanks
-ritesh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ