All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Christian Brauner <brauner@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Kees Cook <keescook@chromium.org>,
	linux-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Ajay Kaher <ajay.kaher@broadcom.com>
Subject: Re: [for-linus][PATCH 1/3] eventfs: Have the inodes all for files and directories all be the same
Date: Thu, 25 Jan 2024 13:07:31 -0500	[thread overview]
Message-ID: <20240125130731.3b0e2a42@gandalf.local.home> (raw)
In-Reply-To: <20240125-deportation-sogenannten-2d57a7ce8f81@brauner>

On Thu, 25 Jan 2024 18:40:31 +0100
Christian Brauner <brauner@kernel.org> wrote:

> But luckily no one is probably going to tar up tracefs. ;)

Actually, inodes isn't the biggest issue of tar, as tar *is* a common
operation on tracefs.

If you want to create a synthetic event using the sqlhist tool for an
embedded board, we recommend copying the tracefs directory over to your
workstation from the embedded device. Unfortunately tar never works. That's
because all tracefs (and debugfs) files have zero size in stat().

 # cd /tmp
 # (cd /sys/kernel && tar cvf - tracing) | tar xvf -
 # ls -s tracing
total 28
0 available_events                  0 max_graph_depth         0 stack_trace
0 available_filter_functions        4 options                 0 stack_trace_filter
0 available_filter_functions_addrs  4 osnoise                 0 synthetic_events
0 available_tracers                 4 per_cpu                 0 timestamp_mode
0 buffer_percent                    0 printk_formats          0 touched_functions
0 buffer_size_kb                    0 README                  0 trace
0 buffer_subbuf_size_kb             0 recursed_functions      0 trace_clock
0 buffer_total_size_kb              0 saved_cmdlines          0 trace_marker
0 current_tracer                    0 saved_cmdlines_size     0 trace_marker_raw
0 dynamic_events                    0 saved_tgids             0 trace_options
0 dyn_ftrace_total_info             0 set_event               0 trace_pipe
0 enabled_functions                 0 set_event_notrace_pid   4 trace_stat
0 error_log                         0 set_event_pid           0 tracing_cpumask
0 eval_map                          0 set_ftrace_filter       0 tracing_max_latency
4 events                            0 set_ftrace_notrace      0 tracing_on
0 free_buffer                       0 set_ftrace_notrace_pid  0 tracing_thresh
0 function_profile_enabled          0 set_ftrace_pid          0 uprobe_events
4 hwlat_detector                    0 set_graph_function      0 uprobe_profile
4 instances                         0 set_graph_notrace       0 user_events_data
0 kprobe_events                     0 snapshot                0 user_events_status
0 kprobe_profile                    0 stack_max_size

So instead we have been recommending cp -r

Note, for the sqlhist command, only the events are needed, so the
instructions is only to copy the events directory, because copying all of
tracefs will try to copy the "trace_pipe" file which will block which hangs
'cp'. And I don't know an option to tell the cp command not to block.

 # cd /tmp
 # mkdir tracing
 # cp -r /sys/kernel/tracing/events tracing/events
 # ls -s tracing/events/sched/sched_switch/
total 20
4 enable  4 filter  4 format  0 hist  0 hist_debug  4 id  0 inject  4 trigger

Where the tar would have had:

 # ls -s tracing/events/sched/sched_switch/
total 0
0 enable  0 filter  0 format  0 hist  0 hist_debug  0 id  0 inject  0 trigger


-- Steve

  reply	other threads:[~2024-01-25 18:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 14:35 [for-linus][PATCH 0/3] eventfs: A few more fixes for 6.8 Steven Rostedt
2024-01-17 14:35 ` [for-linus][PATCH 1/3] eventfs: Have the inodes all for files and directories all be the same Steven Rostedt
2024-01-22 10:38   ` Geert Uytterhoeven
2024-01-22 15:06     ` Steven Rostedt
2024-01-22 16:23       ` Geert Uytterhoeven
2024-01-22 16:47         ` Steven Rostedt
2024-01-22 17:37           ` Linus Torvalds
2024-01-22 17:39             ` Linus Torvalds
2024-01-22 18:19               ` Linus Torvalds
2024-01-22 18:27                 ` Mathieu Desnoyers
2024-01-22 19:37                   ` Steven Rostedt
2024-01-22 18:50                 ` Kees Cook
2024-01-22 19:44                 ` Steven Rostedt
2024-01-22 19:48                   ` Steven Rostedt
2024-01-22 21:33                   ` Kees Cook
2024-01-25 17:40                   ` Christian Brauner
2024-01-25 18:07                     ` Steven Rostedt [this message]
2024-01-25 18:08                       ` Steven Rostedt
2024-01-26  8:07                         ` Geert Uytterhoeven
2024-01-26 10:11                           ` Christian Brauner
2024-01-26 16:25                             ` Steven Rostedt
2024-01-26 19:09                               ` Linus Torvalds
2024-01-26 13:16                           ` Steven Rostedt
2024-01-26 14:06                             ` Steven Rostedt
2024-01-22 17:14       ` Mathieu Desnoyers
2024-01-22 17:50         ` Steven Rostedt
2024-01-22 18:35           ` Mathieu Desnoyers
2024-01-22 19:59             ` Steven Rostedt
2024-01-17 14:35 ` [for-linus][PATCH 2/3] eventfs: Do not create dentries nor inodes in iterate_shared Steven Rostedt
2024-01-17 14:35 ` [for-linus][PATCH 3/3] eventfs: Use kcalloc() instead of kzalloc() Steven Rostedt

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=20240125130731.3b0e2a42@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=ajay.kaher@broadcom.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.