From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FC58C433EF for ; Tue, 26 Jul 2022 07:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238412AbiGZHkv (ORCPT ); Tue, 26 Jul 2022 03:40:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232438AbiGZHji (ORCPT ); Tue, 26 Jul 2022 03:39:38 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4BFEC14 for ; Tue, 26 Jul 2022 00:39:37 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 636431FA15; Tue, 26 Jul 2022 07:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1658821176; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rmbXJGe5s5+edusIb6jmJRsEkx7ZmJqyeOYvqRtA3r0=; b=m+mGuYfkM07cVS8L6C+K7w8NCUFdW71HAXJIFSUNLKGHuBvd01E/xQc+pjzwSCYyBa7z34 3MVA2xjHl1tLxY/A1+rNS7lzt8cIuV8tnxnTA8VKPiqq5y78NScqsj3VlGJEisG7/pFkXZ yZ6kXZlt/vjYXOpwoEebsHID1F379Ao= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 1EFD02C16E; Tue, 26 Jul 2022 07:39:36 +0000 (UTC) Date: Tue, 26 Jul 2022 09:39:32 +0200 From: Petr Mladek To: Sebastian Andrzej Siewior Cc: John Ogness , linux-kernel@vger.kernel.org, Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner Subject: Re: [PATCH v3] printk: Skip console drivers on PREEMPT_RT. Message-ID: References: <87y1wn3g3g.fsf@jogness.linutronix.de> <87ilnrn06u.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2022-07-25 17:16:16, Sebastian Andrzej Siewior wrote: > printk might be invoked in a context with disabled interrupts and or > preemption and additionally disables interrupts before it invokes the > console drivers. This behaviour is not desired on PREEMPT_RT: > - The console driver are using spinlock_t based locking which become sleeping > locks on PREEMPT_RT and must not be acquired with disabled interrupts (or > preemption). > > - The locks within the console drivers must remain sleeping locks and they must > not disable interrupts. Printing (and polling for its completion) at 115200 > baud on an UART takes too long for PREEMPT_RT in general and so raises the > latency of the IRQ-off time of the system beyond acceptable levels. > > Skip printing to the console as temporary workaround until the printing threads > and atomic consoles have been introduced or another solution which is > compatible with the PREEMPT_RT approach. > With this change, the user will not see any kernel message printed to the > console but can retrieve the printk buffer from userland (via the dmesg > command). This allows enable PREEMPT_RT as a whole without disabling printk and > loosing all kernel output. > > Disable console printing on PREEMPT_RT. > > Signed-off-by: Sebastian Andrzej Siewior Thanks a lot for updating the commit message. It looks good to me now. Reviewed-by: Petr Mladek Best Regards, Petr PS: John, if you ack it then I'll queue it for 5.20.