[PATCH 3/4] printk: add offloading takeover traces

From: Sergey Senozhatsky
Date: Mon Dec 04 2017 - 08:55:40 EST


*** FOR TESTING ***

Add more trace events for printing offloading (handoff).

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
---
kernel/printk/printk.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 01626f2f42bd..a34a839e6045 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -620,6 +620,8 @@ static unsigned long spinning_waiter_handoff_disable(void)

static void console_handoff_printing(void)
{
+ trace_offloading_rcuidle("handoff", " ", 0);
+
WRITE_ONCE(console_handoff_waiter, DONT_HANDOFF);
/* The waiter is now free to continue */
spin_release(&console_owner_dep_map, 1, _THIS_IP_);
@@ -3172,6 +3174,9 @@ static int printk_kthread_func(void *data)
WRITE_ONCE(console_handoff_waiter,
SLEEPING_WAITER_HANDOFF);
}
+
+ trace_offloading_rcuidle("set", "console_handoff_waiter",
+ READ_ONCE(console_handoff_waiter));
raw_spin_unlock(&console_owner_lock);

if (spin) {
--
2.15.1