diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index d570b8b9c0a9b467c8ae56345c622be1694ec142..3c76e4af6dadf40b39d59959ab6fb12cd897dfff 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -176,6 +176,13 @@ config TRACING
 	select TRACE_CLOCK
 	select NEED_TASKS_RCU
 
+config GLOBAL_TRACE_BUF_SIZE
+	int
+	prompt "Global ftrace buffer size (for trace_printk)" if EXPERT
+	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 1496a5ac33ae1216ae2acc64f0f149d366906a5e..95aa5866242128028803f91ad9aa18b61ffebd9b 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -878,9 +878,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;