Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp773236rdb; Sun, 18 Feb 2024 11:01:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVsz4Y6Ad8X3X7LQBsaflOIeQHXbmhZYtKh0fCAJOUgsvaTfnmHHCEU4ko8794Wc3+6rGG79W4N4h0QDZ539stqAwJi8VMwAb/3OkaxjQ== X-Google-Smtp-Source: AGHT+IF6X1F9NmOsEI3qnYZle8wrXbClR7Ruv5ZPhm2iwMNdmrVXOviaH0L/2KsRgc+vel+Pq6qx X-Received: by 2002:a50:cc9b:0:b0:564:e5:f6b2 with SMTP id q27-20020a50cc9b000000b0056400e5f6b2mr4388233edi.24.1708282890060; Sun, 18 Feb 2024 11:01:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708282890; cv=pass; d=google.com; s=arc-20160816; b=AZmc/imKSFNsMCHIhU0OdBMlapeAvppDjqG7c3fUd1IqGt5aIyp8uY31GMwAn48iDS HfgeEP7xJ+wwsBeUfjKVWAvJJZBV7oEeYb9Mn1OJSreMcy5+xYrJ1e9cjTYs6vZZgNOB 9zf1PSvISBB5W08kKjOn2ikeTySfO6teznWXBKCMVLFnZaOOJ2co+qOD0zXswmi7zeqG HJDq8ZhThSW+azyCi9o+Z5P4w4ZQtCXsMjSW/NUkpD8TKdm1invKLxa7DKVK0EX9z4Yi umxUAXEIcY0cFHt144UWIsi8B2hSGB0v/MG953K+6RJ5ytY+ByPai+KffOsuQdsXLMSM ObHA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:dkim-signature:dkim-signature:from; bh=ou6pqnQIQ61CFk5TWsTCxvXU+rgsnFekoY9DjGSMLxI=; fh=Zc51f6kezQIPGE+VpfICBLFP+oyouiLrY2CJAQIy7as=; b=My/hqzeCb0XWfcPS2kBrd5qiufLzlmXAh46wIh7DhRGnrY1WOlkJUnTmPUpjSDf/Gw RRzhXi6hqg9WvzebegI5kzUuFUMTKefx49O+ZHIxgDH+rHrIGtcyXIeknvdFe96pHGQ5 d2Ytv+A5q7JKgJGKnjFtvZdwJIOh3t6D+RxM/dy6zyggRQ5oysjw1t1rBuTcPlsDzNDo ZkH91t44WjaM3usqWT7DAzX9rjjPZbNUFfuY+WKHuRb7qOv6VqpWohvr705NOu/gnFeH ISaZ7YL4FQpac9+nzkpgPIZoIgAK2CBCpbqi8EzDLM1EksTmh6DKXZ3YRUTWG1jAQirC J/uA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NvT0XLwH; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-70519-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a20-20020a05640213d400b005642c27ffb9si1321534edx.386.2024.02.18.11.01.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Feb 2024 11:01:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70519-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NvT0XLwH; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-70519-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C4FB21F2116D for ; Sun, 18 Feb 2024 19:01:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72F8D763F9; Sun, 18 Feb 2024 18:58:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NvT0XLwH"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="x2/uK7ua" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC39B745C5; Sun, 18 Feb 2024 18:57:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708282680; cv=none; b=cg5yrMfKClgdurSo4WFQTfcirGT3AQiGDLONqxSOq23DY4mientcKtVdD/4EAX3CT1hcZWcG93J0NipwSgha8NC94mojwLs01mq16OF8odxNRinVkkGN3tVnZjgKU/9u7OaanBwOvXeGmtyGua6OvWTF4ZTFUeo4a4M1J2j9PLI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708282680; c=relaxed/simple; bh=OqtVB7F0XU7K6r/XkEXRYuJkg6/1ejUUWR2/2NldzE0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DUx7BLSjnbQTproe28tJ6wVRqI/B5GCY9pbQ531R28jJF/SVNgTcyYkJIPweF4Cz/OYTLOKo6ejcTr8JN5t7VcajPfnBFdl3KXwpFs+ZZYzVmESXish6/uskqh542ASHDegfgjMw/g0J5kX7bXAOBRVVBgK7WXSUwWXYYdhJiiQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=NvT0XLwH; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=x2/uK7ua; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708282677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ou6pqnQIQ61CFk5TWsTCxvXU+rgsnFekoY9DjGSMLxI=; b=NvT0XLwHYOh9+AxQfVwE3XtEQHME+T7jeyFjb+mH0NRGGQKCbh5EmRxPxr3TogqegumTxl DDyXyi39jg6SLdi/ZLLl2VJ++kV4V4Lz/rHgAjGEip9fKs7uqjgCN6IvPD+SAu54hjehKE /CVFyAJfTYhPJxBXicT0qE+9Cyw4/gJjnqsIh5QHCjZIARUcGp4Q1rminYa7+rRP9eMt8h JuZeaQCUDPY+POfG/+INo0985kWx6JRQpeJPA6LR8sIWTp0IY+ey6lprOPEmSZXBzWY0Y1 KnQoaFyYnphPLhcxg2bAOsdfSkm+OMMq40yl4e8g9g/OthkEZ/0mjKZWOZlSzw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708282677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ou6pqnQIQ61CFk5TWsTCxvXU+rgsnFekoY9DjGSMLxI=; b=x2/uK7uacN1qu3ts3Df1coB1t8Xae85UpjQ3ZkPOYdrYjk/NQ0AEn05N8/xeRAvDI8AjVt OKnGkqYsCYaKYSDg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Mathieu Desnoyers , Lai Jiangshan , Zqiang , rcu@vger.kernel.org Subject: [PATCH printk v2 25/26] rcu: Mark emergency section in rcu stalls Date: Sun, 18 Feb 2024 20:03:25 +0106 Message-Id: <20240218185726.1994771-26-john.ogness@linutronix.de> In-Reply-To: <20240218185726.1994771-1-john.ogness@linutronix.de> References: <20240218185726.1994771-1-john.ogness@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Mark an emergency section within print_other_cpu_stall(), where RCU stall information is printed. In this section, the CPU will not perform console output for the printk() calls. Instead, a flushing of the console output is triggered when exiting the emergency section. Signed-off-by: John Ogness --- kernel/rcu/tree_stall.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index ac8e86babe44..efb2be8939a2 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -9,6 +9,7 @@ #include #include +#include ////////////////////////////////////////////////////////////////////////////// // @@ -604,6 +605,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) if (rcu_stall_is_suppressed()) return; + nbcon_cpu_emergency_enter(); + /* * OK, time to rat on our buddy... * See Documentation/RCU/stallwarn.rst for info on how to debug @@ -658,6 +661,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) panic_on_rcu_stall(); rcu_force_quiescent_state(); /* Kick them all. */ + + nbcon_cpu_emergency_exit(); } static void print_cpu_stall(unsigned long gps) -- 2.39.2