From patchwork Fri Jun 5 23:41:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 213144 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93908C433E1 for ; Fri, 5 Jun 2020 23:42:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 726E420810 for ; Fri, 5 Jun 2020 23:42:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728493AbgFEXmY (ORCPT ); Fri, 5 Jun 2020 19:42:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:57472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728370AbgFEXmX (ORCPT ); Fri, 5 Jun 2020 19:42:23 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E8316206FA; Fri, 5 Jun 2020 23:42:22 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.93) (envelope-from ) id 1jhLyf-002sAr-W7; Fri, 05 Jun 2020 19:42:22 -0400 Message-ID: <20200605234221.847811418@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 05 Jun 2020 19:41:50 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-rt-users Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Daniel Wagner , Tom Zanussi , "Srivatsa S. Bhat" , kernel test robot , John Ogness Subject: [PATCH RT 1/8] printk: console must not schedule for drivers References: <20200605234149.965509211@goodmis.org> MIME-Version: 1.0 Sender: linux-rt-users-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org 5.4.44-rt27-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: John Ogness Even though the printk kthread is always preemptible, it is still not allowed to call cond_resched() from within console drivers. The task may become non-preemptible in the console driver call chain. For example, vt_console_print() takes a spinlock and then can call into fbcon_redraw(), which can conditionally invoke cond_resched(): |BUG: sleeping function called from invalid context at kernel/printk/printk.c:2322 |in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 177, name: printk |CPU: 0 PID: 177 Comm: printk Not tainted 5.6.2-00011-ga536059557f1d9 #1 |Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 |Call Trace: | dump_stack+0x66/0x8b | ___might_sleep+0x102/0x120 | console_conditional_schedule+0x24/0x30 | fbcon_redraw+0x96/0x1c0 | fbcon_scroll+0x556/0xd70 | con_scroll+0x147/0x1e0 | lf+0x9e/0xb0 | vt_console_print+0x253/0x3d0 | printk_kthread_func+0x1d5/0x3b0 Disable cond_resched() for the call into the console drivers. Reported-by: kernel test robot Signed-off-by: John Ogness Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steven Rostedt (VMware) --- kernel/printk/printk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 2affe95866a4..9600373bcf55 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2746,6 +2746,7 @@ static int printk_kthread_func(void *data) &len, printk_time); console_lock(); + console_may_schedule = 0; call_console_drivers(master_seq, ext_text, ext_len, text, len, msg->level, msg->facility); if (len > 0 || ext_len > 0) From patchwork Fri Jun 5 23:41:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 213143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DD66C433E1 for ; Fri, 5 Jun 2020 23:42:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3415D207F9 for ; Fri, 5 Jun 2020 23:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728507AbgFEXmY (ORCPT ); Fri, 5 Jun 2020 19:42:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:57542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728378AbgFEXmX (ORCPT ); Fri, 5 Jun 2020 19:42:23 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3DEB8207D8; Fri, 5 Jun 2020 23:42:23 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.93) (envelope-from ) id 1jhLyg-002sBt-9U; Fri, 05 Jun 2020 19:42:22 -0400 Message-ID: <20200605234222.155657946@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 05 Jun 2020 19:41:52 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-rt-users Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Daniel Wagner , Tom Zanussi , "Srivatsa S. Bhat" Subject: [PATCH RT 3/8] Revert "rt: Improve the serial console PASS_LIMIT" References: <20200605234149.965509211@goodmis.org> MIME-Version: 1.0 Sender: linux-rt-users-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org 5.4.44-rt27-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Sebastian Andrzej Siewior There is no need to loop for longer. The message of too much work was removed in commit 9d7c249a1ef9b ("serial: 8250: drop the printk from serial8250_interrupt()") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steven Rostedt (VMware) --- drivers/tty/serial/8250/8250_core.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 809a65f68028..02bfafa8a672 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -55,16 +55,7 @@ static struct uart_driver serial8250_reg; static unsigned int skip_txen_test; /* force skip of txen test at init time */ -/* - * On -rt we can have a more delays, and legitimately - * so - so don't drop work spuriously and spam the - * syslog: - */ -#ifdef CONFIG_PREEMPT_RT -# define PASS_LIMIT 1000000 -#else -# define PASS_LIMIT 512 -#endif +#define PASS_LIMIT 512 #include /* From patchwork Fri Jun 5 23:41:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 213142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E901BC433DF for ; Fri, 5 Jun 2020 23:42:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1988206E6 for ; Fri, 5 Jun 2020 23:42:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728614AbgFEXmp (ORCPT ); Fri, 5 Jun 2020 19:42:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:57574 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728483AbgFEXmY (ORCPT ); Fri, 5 Jun 2020 19:42:24 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1055F207F5; Fri, 5 Jun 2020 23:42:24 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.93) (envelope-from ) id 1jhLyh-002sEU-4K; Fri, 05 Jun 2020 19:42:23 -0400 Message-ID: <20200605234223.007651175@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 05 Jun 2020 19:41:57 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-rt-users Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Daniel Wagner , Tom Zanussi , "Srivatsa S. Bhat" Subject: [PATCH RT 8/8] Linux 5.4.44-rt27-rc1 References: <20200605234149.965509211@goodmis.org> MIME-Version: 1.0 Sender: linux-rt-users-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org 5.4.44-rt27-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: "Steven Rostedt (VMware)" --- localversion-rt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localversion-rt b/localversion-rt index 2e9afd4a0afd..3b0c6038dae9 100644 --- a/localversion-rt +++ b/localversion-rt @@ -1 +1 @@ --rt26 +-rt27-rc1