Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp485794imn; Tue, 26 Jul 2022 00:47:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sFiMBKpTaONPNsypPI5FwdVQ/f7JDfBWYMqTTDe1O6K4dwCquloJz8HmDn1oaheIWvfjiK X-Received: by 2002:a17:907:2c47:b0:72b:9478:924c with SMTP id hf7-20020a1709072c4700b0072b9478924cmr13013007ejc.188.1658821675978; Tue, 26 Jul 2022 00:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658821675; cv=none; d=google.com; s=arc-20160816; b=O0dEie1R0ISZGyLxYaWKoqULJZMOxwLUX8EhjLLchC4v9AotVPz6b2SWainuqtKi88 W8pGunHJrR0ub11VJCgD6N0A1MQzeNQfdCdVa/tb0BE0GTD8a8hrghked79ojIQuLVMV nRqSj+4j16By9LB0XWVqHYkV/LSxSvegcuYPXXzT3GbO2pfnQXhvwGZSD57QHhqyOye+ ublhlEFdexQf70bXBeQ/MjRpgdJWGiblfFK6IKjtk074WYmW6/s1tcaQsG4jP7YRQ6II RmacZWfz1bGJJZnG7yKJECDqxLJBrE3ErWx0YYsjR/40Y0j7qoENU3J/YC8K/sUwgalt 0SRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rmbXJGe5s5+edusIb6jmJRsEkx7ZmJqyeOYvqRtA3r0=; b=zmn2roHgxMjaiZxgD98TnLJFxL5hwVL+o0PUWHH+S+66NQcSMN2v8Dc2R5FG0MZHY9 3A9LN0YTw4fXT7J9pIllKqKQORBDGWGay5p/h7n/t5bUjNIX6Ra+GPTjCG6MB3Wyft5r MQxFLClgUQclYedwR86ogsrsyWHr8Mjfb3eBJFq79RY5QYOmaYPRf82BJKSGCNaKo/Tl mgPmdItjnqQ2QHxHT8naVnzmJSaQqT/uL5fnH7Ac5DggqlidrYfDzRDQ4/y/CO/Zqc2a 0FhS7LWwCHzOT3e0wcxurEg3LBAuqXuDztg61mJ1ENYTk/4UExc7DnLvUKWKvGudG91Y haKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=m+mGuYfk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa44-20020a17090786ac00b0072f09e70939si17529635ejc.131.2022.07.26.00.47.31; Tue, 26 Jul 2022 00:47:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=m+mGuYfk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232268AbiGZHku (ORCPT + 99 others); Tue, 26 Jul 2022 03:40:50 -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: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.