[Skiboot] [PATCH 2/4] FSP/CONSOLE: Close SOL session during R/R

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Sep 25 03:45:35 AEST 2017


Presently we are not closing SOL and FW sessions during R/R. Host will continue
to write to SOL during FSP R/R. If there is heavy console write operation
happening during FSP R/R (like running `top` command inside cosnole), then at
some point console buffer becomes full. Call to fsp_console_write_buffer_space()
returns 0 (or less than required space to write data) to host. While one thread
is busy writing to console, if some other threads tries to write daa to console
we may see RCU stalls (like below) in kernel.

kernel call trace:
------------------
[ 2082.828363] INFO: rcu_sched detected stalls on CPUs/tasks: { 32} (detected by 16, t=6002 jiffies, g=23154, c=23153, q=254769)
[ 2082.828365] Task dump for CPU 32:
[ 2082.828368] kworker/32:3    R  running task        0  4637      2 0x00000884
[ 2082.828375] Workqueue: events dump_work_fn
[ 2082.828376] Call Trace:
[ 2082.828382] [c000000f1633fa00] [c00000000013b6b0] console_unlock+0x570/0x600 (unreliable)
[ 2082.828384] [c000000f1633fae0] [c00000000013ba34] vprintk_emit+0x2f4/0x5c0
[ 2082.828389] [c000000f1633fb60] [c00000000099e644] printk+0x84/0x98
[ 2082.828391] [c000000f1633fb90] [c0000000000851a8] dump_work_fn+0x238/0x250
[ 2082.828394] [c000000f1633fc60] [c0000000000ecb98] process_one_work+0x198/0x4b0
[ 2082.828396] [c000000f1633fcf0] [c0000000000ed3dc] worker_thread+0x18c/0x5a0
[ 2082.828399] [c000000f1633fd80] [c0000000000f4650] kthread+0x110/0x130
[ 2082.828403] [c000000f1633fe30] [c000000000009674] ret_from_kernel_thread+0x5c/0x68

Hence lets close SOL (and FW console) during FSP R/R.

CC: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/fsp/fsp-console.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
index c41f5ed..be11d9b 100644
--- a/hw/fsp/fsp-console.c
+++ b/hw/fsp/fsp-console.c
@@ -122,9 +122,6 @@ static void fsp_close_consoles(void)
 		if (!fs->available)
 			continue;
 
-		if (fs->rsrc_id == 0xffff)	/* Get clarity from benh */
-			continue;
-
 		lock(&fsp_con_lock);
 		if (fs->open) {
 			fs->open = false;
-- 
2.9.3



More information about the Skiboot mailing list