summaryrefslogtreecommitdiff
path: root/patches/trace-writeback--Block-cgroup-path-tracing-on-RT.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/trace-writeback--Block-cgroup-path-tracing-on-RT.patch')
-rw-r--r--patches/trace-writeback--Block-cgroup-path-tracing-on-RT.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/patches/trace-writeback--Block-cgroup-path-tracing-on-RT.patch b/patches/trace-writeback--Block-cgroup-path-tracing-on-RT.patch
new file mode 100644
index 000000000000..d3c45f35b1dd
--- /dev/null
+++ b/patches/trace-writeback--Block-cgroup-path-tracing-on-RT.patch
@@ -0,0 +1,55 @@
+Subject: trace/writeback: Block cgroup path tracing on RT
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Sun, 28 Feb 2016 15:14:43 +0100
+
+Yang reported that with CGROUP_WRITEBACK enabled the tracer triggers the
+following backtrace:
+
+BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:930
+in_atomic(): 1, irqs_disabled(): 0, pid: 625, name: kworker/u16:3
+INFO: lockdep is turned off.
+Preemption disabled at:[<ffffffc000374a5c>] wb_writeback+0xec/0x830
+
+CPU: 7 PID: 625 Comm: kworker/u16:3 Not tainted 4.4.1-rt5 #20
+Hardware name: Freescale Layerscape 2085a RDB Board (DT)
+Workqueue: writeback wb_workfn (flush-7:0)
+Call trace:
+[<ffffffc00008d708>] dump_backtrace+0x0/0x200
+[<ffffffc00008d92c>] show_stack+0x24/0x30
+[<ffffffc0007b0f40>] dump_stack+0x88/0xa8
+[<ffffffc000127d74>] ___might_sleep+0x2ec/0x300
+[<ffffffc000d5d550>] rt_spin_lock+0x38/0xb8
+[<ffffffc0003e0548>] kernfs_path_len+0x30/0x90
+[<ffffffc00036b360>] trace_event_raw_event_writeback_work_class+0xe8/0x2e8
+[<ffffffc000374f90>] wb_writeback+0x620/0x830
+[<ffffffc000376224>] wb_workfn+0x61c/0x950
+[<ffffffc000110adc>] process_one_work+0x3ac/0xb30
+[<ffffffc0001112fc>] worker_thread+0x9c/0x7a8
+[<ffffffc00011a9e8>] kthread+0x190/0x1b0
+[<ffffffc000086ca0>] ret_from_fork+0x10/0x30
+
+Yang proposed to provide an unlocked function for accessing the cgroup path,
+but that'd involve synchronize_sched() in a syscall, which is not desired
+either. There was some discussion about using the inode number or the cgroup
+id, but so far we have no working solution.
+
+Disable the CGROUP_WRITEBACK path tracing for now when RT is enabled.
+
+Reported-by: Yang Shi <yang.shi@linaro.org>
+Link: http://lkml.kernel.org/r/1456528481-15936-1-git-send-email-yang.shi@linaro.org
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+---
+ include/trace/events/writeback.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/trace/events/writeback.h
++++ b/include/trace/events/writeback.h
+@@ -132,7 +132,7 @@ DEFINE_EVENT(writeback_dirty_inode_templ
+ );
+
+ #ifdef CREATE_TRACE_POINTS
+-#ifdef CONFIG_CGROUP_WRITEBACK
++#if defined(CONFIG_CGROUP_WRITEBACK) && !defined(CONFIG_PREEMPT_RT_FULL)
+
+ static inline size_t __trace_wb_cgroup_size(struct bdi_writeback *wb)
+ {