Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3647290iog; Tue, 21 Jun 2022 03:06:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vaCMMOfwdpR3WZ4urlm2WJ4ybQedhJD5NzxifnFkFTPvaCzKwNawFdIV+qGwlvfl0aSsw5 X-Received: by 2002:a17:906:5344:b0:712:3c7e:cf58 with SMTP id j4-20020a170906534400b007123c7ecf58mr25527174ejo.679.1655805980397; Tue, 21 Jun 2022 03:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655805980; cv=none; d=google.com; s=arc-20160816; b=Inwxz/RxNMb31jkle8XCKV1lliZvqmuEZcS+39x7inr5MALXiAUgK3YMZhaERsHzKe B9yKi9TBsYXaJ1n5kRnNHxKWWqgCLXoGd4bPNu4OcRFo9LNtkgCUxybQMn6DWXkYSBXK Nd2pZyc0P/KuzfaDa8xe4bbKo1vPICnWUWZnJO1h0xV653ssQ9LF1zVArWBwPVXeCuE6 JTsg9pzU+RzVFV02uDLckchHooK0kg2Idk804Wp1sZq2PT+jN7RfOcqsaydcvqIu2/7o aft1DR+XaHHY9kxWwIiflSfNxPhIx5XJtqORoHJIjrpUu2CgrKDEsZxCeh6kVf0ScmtU d9QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=X2IXaONzO9vSwoT16JIFLXoBnJKoMClV+9+ObXL5XA0=; b=iQ1kdbLS2qbK9dERQXOpzFi9buvHKQukOu1aTqo5Jwg/bxkpvgS2b7W2Ni83Sp+J8t RYf3WkAj81dZjxLv8jgjYAwRfUFcItja7lwdeKck+fZTwBcJXvH45r0Kqq+md8O7qPZM ir9pLBUlPm43HPSAdb3hx2Sb9bnUXEvF+5RArY18fMR+C5o4wLrUYlFSLQj4GIy00SFG sCqsNDDZaoz3XwyYngnumaIwJ+S17IWXyoGvGVXhRnZ/ZI31qorhs6M9CoUw255wy02f KoWCrlkkH9io05lMI0k4ckqURT1qs+cYq5j6cQSehT8XFOCGyeddafHyPB/Ne0axNJfS pPSg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020a056402274400b0042df5c053eesi15322507edd.407.2022.06.21.03.05.54; Tue, 21 Jun 2022 03:06:20 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349774AbiFUJnz convert rfc822-to-8bit (ORCPT + 99 others); Tue, 21 Jun 2022 05:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349619AbiFUJng (ORCPT ); Tue, 21 Jun 2022 05:43:36 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0C7FC1A07A for ; Tue, 21 Jun 2022 02:43:34 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-168-bVQTvNNEM_uczimQWYB4OA-1; Tue, 21 Jun 2022 10:43:32 +0100 X-MC-Unique: bVQTvNNEM_uczimQWYB4OA-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Tue, 21 Jun 2022 10:43:31 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.036; Tue, 21 Jun 2022 10:43:31 +0100 From: David Laight To: 'Petr Mladek' , "Jason A. Donenfeld" CC: John Ogness , Marco Elver , "linux-kernel@vger.kernel.org" , "Sergey Senozhatsky" , Steven Rostedt Subject: RE: [PATCH v3] printk: allow direct console printing to be enabled always Thread-Topic: [PATCH v3] printk: allow direct console printing to be enabled always Thread-Index: AQHYhMbxDgh8TJZ3TESIjSW/xv0YW61Zm+IA Date: Tue, 21 Jun 2022 09:43:31 +0000 Message-ID: <182076f58e5943af88f38e5202942d41@AcuMS.aculab.com> References: <20220619233302.601092-1-Jason@zx2c4.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Petr Mladek > Sent: 20 June 2022 17:58 > > On Mon 2022-06-20 01:33:02, Jason A. Donenfeld wrote: > > In 5.19, there are some changes in printk message ordering / > > interleaving which leads to confusion. The most obvious (and benign) > > example appears on system boot, in which the "Run /init as init process" > > message gets intermixed with the messages that init actually writes() to > > stdout. For example, here's a snippet from build.wireguard.com: > > > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -35,6 +35,18 @@ config PRINTK_CALLER > > no option to enable/disable at the kernel command line parameter or > > sysfs interface. > > > > +config PRINTK_DIRECT > > + bool "Attempt to flush printk output immediately" > > + depends on PRINTK > > + help > > + Rather than using kthreads for printk output, always attempt to write > > + to the console immediately. This has performance implications, but > > + will result in a more faithful ordering and interleaving with other > > + processes writing to the console. > > + > > + Say N here unless you really need this. This may also be controlled > > + at boot time with printk.direct=0/1. > > + > > I am fine with the patch except for the config option. Is there > any particular reason why we need it, please? > > We should be careful to add new build options in general because they > make building the kernel more complicated. People need to understand > what each option is about and what they want. Especially since most people use pre-built kernels. I suspect that kernels only get build for very big and very small/embedded systems. For the latter you may want to completely remove using kthreads for printk in order to shrink the kernel size. But that doesn't look like what this option is for. David > Kernel parameters are less intrusive. People need to care about > it only when they need some special behavior. And everyone has > its own default command line anyway. For example, I always use > ignore_loglevel. > > Best Regards, > Petr - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)