Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-30 Thread Steven Rostedt
On Mon, 29 Jun 2020 22:16:59 -0700 Alexei Starovoitov wrote: > > > > Warning, not even compiled tested. > > Thanks! I see what you mean now. Great! :-) > > > > > -- Steve > > > > diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile > > index 6575bb0a0434..aeba5ee7325a 100644 > > --

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-29 Thread Alexei Starovoitov
On Sun, Jun 28, 2020 at 07:43:34PM -0400, Steven Rostedt wrote: > On Sun, 28 Jun 2020 18:28:42 -0400 > Steven Rostedt wrote: > > > You create a bpf event just like you create any other event. When a bpf > > program that uses a bpf_trace_printk() is loaded, you can enable that > > event from withi

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-28 Thread Steven Rostedt
On Sun, 28 Jun 2020 18:28:42 -0400 Steven Rostedt wrote: > You create a bpf event just like you create any other event. When a bpf > program that uses a bpf_trace_printk() is loaded, you can enable that > event from within the kernel. Yes, there's internal interfaces to > enabled and disable even

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-28 Thread Steven Rostedt
On Sun, 28 Jun 2020 15:02:09 -0700 Alexei Starovoitov wrote: > > > > Then do a bpf trace event and enable it when a bpf_trace_printk() is > > loaded. It will work the same for your users. > > I'm not sure I follow. How that would preserve the expectation > to see the output in /sys/kernel/deb

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-28 Thread Alexei Starovoitov
On Sun, Jun 28, 2020 at 03:43:31PM -0400, Steven Rostedt wrote: > On Sun, 28 Jun 2020 12:21:07 -0700 > Alexei Starovoitov wrote: > > > > Re-teach them, or are you finally admitting that the tracing system is > > > a permanent API? This is the reason people are refusing to add trace > > > points

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-28 Thread Steven Rostedt
On Sun, 28 Jun 2020 12:21:07 -0700 Alexei Starovoitov wrote: > > Re-teach them, or are you finally admitting that the tracing system is > > a permanent API? This is the reason people are refusing to add trace > > points into their subsystems. Because user space may make it required. > > > > I

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-28 Thread Alexei Starovoitov
On Sun, Jun 28, 2020 at 02:46:16PM -0400, Steven Rostedt wrote: > > > > By now everyone has learned to use bpf_trace_printk() and expects > > to see the output in /sys/kernel/debug/tracing/trace. > > It's documented in uapi/bpf.h and various docs. > > Re-teach them, or are you finally admitting t

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-28 Thread Steven Rostedt
On Sun, 28 Jun 2020 14:46:16 -0400 Steven Rostedt wrote: > > We added a bunch of code to libbcc in the past to support instances, > > but eventually removed it all due to memory overhead per instance. > > If I recall it was ~8Mbyte per instance. That was couple years ago. > > I'd like to see w

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-28 Thread Steven Rostedt
On Sun, 28 Jun 2020 10:27:00 -0700 Alexei Starovoitov wrote: > On Fri, Jun 26, 2020 at 06:14:55PM -0400, Steven Rostedt wrote: > > On Wed, 24 Jun 2020 20:59:13 -0700 > > Alexei Starovoitov wrote: > > > > > > > > > > > > Nack. > > > > I nack your nack ;-) > > ok. let's take it up to Linu

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-28 Thread Alexei Starovoitov
On Fri, Jun 26, 2020 at 06:14:55PM -0400, Steven Rostedt wrote: > On Wed, 24 Jun 2020 20:59:13 -0700 > Alexei Starovoitov wrote: > > > > > > > > > Nack. > > I nack your nack ;-) ok. let's take it up to Linus to decide. > > > > > The message is bogus. It's used in production kernels. > > > > b

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-26 Thread Steven Rostedt
On Wed, 24 Jun 2020 20:59:13 -0700 Alexei Starovoitov wrote: > > > > > > Nack. I nack your nack ;-) > > > The message is bogus. It's used in production kernels. > > > bpf_trace_printk() calls it. > > > > Interesting. BTW, the same information (trace_printk is for debugging > > only) is repea

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread Alexei Starovoitov
On Thu, Jun 25, 2020 at 10:00:09AM +0800, Nicolas Boichat wrote: > On Thu, Jun 25, 2020 at 1:25 AM Alexei Starovoitov > wrote: > > > > On Wed, Jun 24, 2020 at 9:07 AM Steven Rostedt wrote: > > > > > > On Wed, 24 Jun 2020 16:45:24 +0800 > > > Nicolas Boichat wrote: > > > > > > > trace_printk is o

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread Nicolas Boichat
On Thu, Jun 25, 2020 at 1:25 AM Alexei Starovoitov wrote: > > On Wed, Jun 24, 2020 at 9:07 AM Steven Rostedt wrote: > > > > On Wed, 24 Jun 2020 16:45:24 +0800 > > Nicolas Boichat wrote: > > > > > trace_printk is only meant as a debugging tool, and should never be > > > compiled into production c

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread Nicolas Boichat
On Thu, Jun 25, 2020 at 12:04 AM Steven Rostedt wrote: > > On Wed, 24 Jun 2020 16:45:24 +0800 > Nicolas Boichat wrote: > > > trace_printk is only meant as a debugging tool, and should never be > > compiled into production code without source code changes, as > > indicated by the warning that show

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread Nicolas Boichat
On Wed, Jun 24, 2020 at 9:57 PM Jason Gunthorpe wrote: > > On Wed, Jun 24, 2020 at 04:45:24PM +0800, Nicolas Boichat wrote: > > trace_printk is only meant as a debugging tool, and should never be > > compiled into production code without source code changes, as > > indicated by the warning that sh

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread kernel test robot
Hi Nicolas, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on tip/perf/core kees/for-next/pstore linus/master v5.8-rc2 next-20200624] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submit

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread kernel test robot
Hi Nicolas, Thank you for the patch! Yet something to improve: [auto build test ERROR on linux/master] [also build test ERROR on tip/perf/core kees/for-next/pstore linus/master v5.8-rc2 next-20200624] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting pat

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread Alexei Starovoitov
On Wed, Jun 24, 2020 at 9:07 AM Steven Rostedt wrote: > > On Wed, 24 Jun 2020 16:45:24 +0800 > Nicolas Boichat wrote: > > > trace_printk is only meant as a debugging tool, and should never be > > compiled into production code without source code changes, as > > indicated by the warning that shows

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread Steven Rostedt
On Wed, 24 Jun 2020 16:45:24 +0800 Nicolas Boichat wrote: > trace_printk is only meant as a debugging tool, and should never be > compiled into production code without source code changes, as > indicated by the warning that shows up on boot if any trace_printk > is called: > ** NOTICE NOTICE N

Re: [PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread Jason Gunthorpe
On Wed, Jun 24, 2020 at 04:45:24PM +0800, Nicolas Boichat wrote: > trace_printk is only meant as a debugging tool, and should never be > compiled into production code without source code changes, as > indicated by the warning that shows up on boot if any trace_printk > is called: > ** NOTICE NOT

[PATCH] kernel/trace: Add TRACING_ALLOW_PRINTK config option

2020-06-24 Thread Nicolas Boichat
trace_printk is only meant as a debugging tool, and should never be compiled into production code without source code changes, as indicated by the warning that shows up on boot if any trace_printk is called: ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** **