All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ftrace: Allow configuring global trace buffer size (for dump-on-oops)
@ 2017-11-13 13:07 ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-11-13 13:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: intel-gfx, Chris Wilson, Steven Rostedt, Peter Zijlstra,
	Ingo Molnar, Tomi Sarvela, Joonas Lahtinen, Daniel Vetter

We have recently turned on ftrace-dump-on-oops for i915's CI and an
issue we have encountered is that the trace buffer size greatly exceeds
the pstore capabilities; we get the tail of the oops but not the
introduction.

Currently the global buffer size is controllable on the cmdline, but at
the request of our CI sysadmin, we would like to add a control to the
Kconfig as well. The rationale being the cmdline carries the temporary
hacks that we want to eradicate, and we want to track the permanent
configuration in .config.

I have kept the Kconfig option hidden from the user as the default
should suffice for the majority of users; reserving the configuration
for those that eschew the cmdline option.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 kernel/trace/Kconfig | 6 ++++++
 kernel/trace/trace.c | 4 +---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 434c840e2d82..d5b3b13a66b5 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -100,6 +100,12 @@ config TRACING
 	select EVENT_TRACING
 	select TRACE_CLOCK
 
+config GLOBAL_TRACE_BUF_SIZE
+	int
+	range 0 4194034
+	default 1441792 # 16384 * 88 (sizeof(struct print_entry))
+	depends on TRACING
+
 config GENERIC_TRACER
 	bool
 	select TRACING
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 752e5daf0896..b1e6ebd96da3 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -614,9 +614,7 @@ int tracing_is_enabled(void)
  * to not have to wait for all that output. Anyway this can be
  * boot time and run time configurable.
  */
-#define TRACE_BUF_SIZE_DEFAULT	1441792UL /* 16384 * 88 (sizeof(entry)) */
-
-static unsigned long		trace_buf_size = TRACE_BUF_SIZE_DEFAULT;
+static unsigned long		trace_buf_size = CONFIG_GLOBAL_TRACE_BUF_SIZE;
 
 /* trace_types holds a link list of available tracers. */
 static struct tracer		*trace_types __read_mostly;
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] ftrace: Allow configuring global trace buffer size (for dump-on-oops)
@ 2017-11-13 13:07 ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-11-13 13:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Daniel Vetter, intel-gfx, Tomi Sarvela,
	Steven Rostedt, Ingo Molnar

We have recently turned on ftrace-dump-on-oops for i915's CI and an
issue we have encountered is that the trace buffer size greatly exceeds
the pstore capabilities; we get the tail of the oops but not the
introduction.

Currently the global buffer size is controllable on the cmdline, but at
the request of our CI sysadmin, we would like to add a control to the
Kconfig as well. The rationale being the cmdline carries the temporary
hacks that we want to eradicate, and we want to track the permanent
configuration in .config.

I have kept the Kconfig option hidden from the user as the default
should suffice for the majority of users; reserving the configuration
for those that eschew the cmdline option.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 kernel/trace/Kconfig | 6 ++++++
 kernel/trace/trace.c | 4 +---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 434c840e2d82..d5b3b13a66b5 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -100,6 +100,12 @@ config TRACING
 	select EVENT_TRACING
 	select TRACE_CLOCK
 
+config GLOBAL_TRACE_BUF_SIZE
+	int
+	range 0 4194034
+	default 1441792 # 16384 * 88 (sizeof(struct print_entry))
+	depends on TRACING
+
 config GENERIC_TRACER
 	bool
 	select TRACING
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 752e5daf0896..b1e6ebd96da3 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -614,9 +614,7 @@ int tracing_is_enabled(void)
  * to not have to wait for all that output. Anyway this can be
  * boot time and run time configurable.
  */
-#define TRACE_BUF_SIZE_DEFAULT	1441792UL /* 16384 * 88 (sizeof(entry)) */
-
-static unsigned long		trace_buf_size = TRACE_BUF_SIZE_DEFAULT;
+static unsigned long		trace_buf_size = CONFIG_GLOBAL_TRACE_BUF_SIZE;
 
 /* trace_types holds a link list of available tracers. */
 static struct tracer		*trace_types __read_mostly;
-- 
2.15.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* ✗ Fi.CI.BAT: failure for ftrace: Allow configuring global trace buffer size (for dump-on-oops)
  2017-11-13 13:07 ` Chris Wilson
  (?)
@ 2017-11-13 14:02 ` Patchwork
  -1 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-11-13 14:02 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: ftrace: Allow configuring global trace buffer size (for dump-on-oops)
URL   : https://patchwork.freedesktop.org/series/33707/
State : failure

== Summary ==

Series 33707v1 ftrace: Allow configuring global trace buffer size (for dump-on-oops)
https://patchwork.freedesktop.org/api/1.0/series/33707/revisions/1/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                fail       -> PASS       (fi-kbl-7500u) fdo#102514
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713
                incomplete -> PASS       (fi-kbl-7560u) fdo#102846
Test vgem_basic:
        Subgroup dmabuf-export:
                pass       -> INCOMPLETE (fi-bxt-dsi)
                pass       -> INCOMPLETE (fi-glk-1) fdo#103706
        Subgroup unload:
                notrun     -> INCOMPLETE (fi-snb-2520m) fdo#103702 +1

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#102846 https://bugs.freedesktop.org/show_bug.cgi?id=102846
fdo#103706 https://bugs.freedesktop.org/show_bug.cgi?id=103706
fdo#103702 https://bugs.freedesktop.org/show_bug.cgi?id=103702

fi-bdw-5557u     total:285  pass:263  dwarn:0   dfail:1   fail:0   skip:20 
fi-bdw-gvtdvm    total:285  pass:260  dwarn:0   dfail:1   fail:0   skip:23 
fi-blb-e6850     total:285  pass:218  dwarn:1   dfail:1   fail:0   skip:64 
fi-bsw-n3050     total:285  pass:238  dwarn:0   dfail:1   fail:0   skip:45 
fi-bwr-2160      total:285  pass:178  dwarn:0   dfail:1   fail:0   skip:105
fi-bxt-dsi       total:278  pass:247  dwarn:0   dfail:1   fail:0   skip:29 
fi-bxt-j4205     total:285  pass:255  dwarn:0   dfail:1   fail:0   skip:28 
fi-byt-j1900     total:285  pass:249  dwarn:0   dfail:1   fail:0   skip:34 
fi-byt-n2820     total:285  pass:245  dwarn:0   dfail:1   fail:0   skip:38 
fi-elk-e7500     total:285  pass:224  dwarn:0   dfail:1   fail:0   skip:59 
fi-gdg-551       total:285  pass:174  dwarn:0   dfail:1   fail:1   skip:108
fi-glk-1         total:278  pass:249  dwarn:0   dfail:1   fail:0   skip:27 
fi-hsw-4770      total:285  pass:257  dwarn:0   dfail:1   fail:0   skip:26 
fi-hsw-4770r     total:285  pass:257  dwarn:0   dfail:1   fail:0   skip:26 
fi-ilk-650       total:285  pass:223  dwarn:0   dfail:1   fail:0   skip:60 
fi-ivb-3520m     total:285  pass:255  dwarn:0   dfail:1   fail:0   skip:28 
fi-ivb-3770      total:285  pass:255  dwarn:0   dfail:1   fail:0   skip:28 
fi-kbl-7500u     total:285  pass:259  dwarn:1   dfail:1   fail:0   skip:23 
fi-kbl-7560u     total:285  pass:265  dwarn:0   dfail:1   fail:0   skip:18 
fi-kbl-7567u     total:285  pass:264  dwarn:0   dfail:1   fail:0   skip:19 
fi-kbl-r         total:285  pass:257  dwarn:0   dfail:1   fail:0   skip:26 
fi-pnv-d510      total:285  pass:217  dwarn:1   dfail:1   fail:0   skip:65 
fi-skl-6260u     total:285  pass:264  dwarn:0   dfail:1   fail:0   skip:19 
fi-skl-6600u     total:285  pass:257  dwarn:0   dfail:1   fail:0   skip:26 
fi-skl-6700hq    total:285  pass:258  dwarn:0   dfail:1   fail:0   skip:25 
fi-skl-6700k     total:285  pass:260  dwarn:0   dfail:1   fail:0   skip:23 
fi-skl-6770hq    total:285  pass:264  dwarn:0   dfail:1   fail:0   skip:19 
fi-skl-gvtdvm    total:285  pass:261  dwarn:0   dfail:1   fail:0   skip:22 
fi-snb-2520m     total:285  pass:245  dwarn:0   dfail:1   fail:0   skip:38 
fi-snb-2600      total:285  pass:244  dwarn:0   dfail:1   fail:0   skip:39 
Blacklisted hosts:
fi-cfl-s         total:285  pass:252  dwarn:0   dfail:1   fail:0   skip:31 
fi-glk-dsi       total:285  pass:252  dwarn:0   dfail:1   fail:2   skip:29 

9a81c142768eb620a24b02a136716a44c304563f drm-tip: 2017y-11m-13d-11h-44m-54s UTC integration manifest
ff5b3dc10295 ftrace: Allow configuring global trace buffer size (for dump-on-oops)

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7090/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ftrace: Allow configuring global trace buffer size (for dump-on-oops)
  2017-11-13 13:07 ` Chris Wilson
@ 2017-11-14 11:28   ` Chris Wilson
  -1 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-11-14 11:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: intel-gfx, Steven Rostedt, Peter Zijlstra, Ingo Molnar,
	Tomi Sarvela, Joonas Lahtinen, Daniel Vetter

Quoting Chris Wilson (2017-11-13 13:07:08)
> We have recently turned on ftrace-dump-on-oops for i915's CI and an
> issue we have encountered is that the trace buffer size greatly exceeds
> the pstore capabilities; we get the tail of the oops but not the
> introduction.
> 
> Currently the global buffer size is controllable on the cmdline, but at
> the request of our CI sysadmin, we would like to add a control to the
> Kconfig as well. The rationale being the cmdline carries the temporary
> hacks that we want to eradicate, and we want to track the permanent
> configuration in .config.
> 
> I have kept the Kconfig option hidden from the user as the default
> should suffice for the majority of users; reserving the configuration
> for those that eschew the cmdline option.

Odd, by removing the prompt the default value will always override the
user value in .config.

I had to restore a 
	prompt "Global ftrace buffer size" if EXPERT
to keep it configurable.
-Chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ftrace: Allow configuring global trace buffer size (for dump-on-oops)
@ 2017-11-14 11:28   ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-11-14 11:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Daniel Vetter, intel-gfx, Tomi Sarvela,
	Steven Rostedt, Ingo Molnar

Quoting Chris Wilson (2017-11-13 13:07:08)
> We have recently turned on ftrace-dump-on-oops for i915's CI and an
> issue we have encountered is that the trace buffer size greatly exceeds
> the pstore capabilities; we get the tail of the oops but not the
> introduction.
> 
> Currently the global buffer size is controllable on the cmdline, but at
> the request of our CI sysadmin, we would like to add a control to the
> Kconfig as well. The rationale being the cmdline carries the temporary
> hacks that we want to eradicate, and we want to track the permanent
> configuration in .config.
> 
> I have kept the Kconfig option hidden from the user as the default
> should suffice for the majority of users; reserving the configuration
> for those that eschew the cmdline option.

Odd, by removing the prompt the default value will always override the
user value in .config.

I had to restore a 
	prompt "Global ftrace buffer size" if EXPERT
to keep it configurable.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-14 11:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 13:07 [PATCH] ftrace: Allow configuring global trace buffer size (for dump-on-oops) Chris Wilson
2017-11-13 13:07 ` Chris Wilson
2017-11-13 14:02 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-11-14 11:28 ` [PATCH] " Chris Wilson
2017-11-14 11:28   ` Chris Wilson

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.