Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp250201iog; Mon, 13 Jun 2022 01:41:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWB5P206fa2l/AklKO5lMaW8ZqZ5CPgLRLqkLDYdAqNBuu5zcPmJKXUeYn73oBEnsM1CUP X-Received: by 2002:a17:907:7f0e:b0:707:ed6b:2e80 with SMTP id qf14-20020a1709077f0e00b00707ed6b2e80mr52126385ejc.425.1655109662675; Mon, 13 Jun 2022 01:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655109662; cv=none; d=google.com; s=arc-20160816; b=t9AkjEP3rzqIN1XtMd7Mfq717v47ZxXQ+VQecPiGW0ZaHSY3UEkuAweD/LSlMorjcN NsiKKHjwWGSoW5PWVhnvUzedv9QbrvgkM9Lcy/lD1WptAKmwD+vQgc7I3roAo5GP/vAH NnEbBcCDHMb27JFj+PpBL+2oxzdxVtRwLcxFnJaFBQrLz1MmqfPrQq3qrzijiLSuQyc8 L14pUGxugD2z4DY/1Rkrb3R1MmjAdlKb4kH3IHqkb9IiM84NCrwyEQH2tStxBVAXFYmV 8GEli7ftBZAU+DU4NyvHt0a4QlZA7lZ72DfmDd1DIiPpbzVEG3v0wyDIm3qbOp0OsZiT eFgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=6YfnLzYsqZtamSjbgNwE+1ANi1MPYoPaKZoAdpL94tw=; b=i5UwHJ76tcF/0mfjr+XUreSrWthupaoY1fN5SfBC6kUVhCsua4HgZLeEO8Uf1SBaix Uy+mFY4LQDQl+M9fM4texVO1+hura4UxLYmVv2Q1idt+5ekiOVgxEDJi4sURuSouD9PU S1FXO0oeGscIDzTtEdmqIoT3CnrEXaQZ8wfSF8Z3dECR7SzV18TTE0cQvvaTLCSi1uZx 7TGcpVF6C7SD/Ll/XnezVVazlf7c+q3zf6CnhU0XPw5Rfw9Da1jnbRNHxAiAWQwPh70Y vRIZy8PKAxqCxXJjBMLkM1RO1sbtJmbnLHm1aiRNWm+fc2UfbRN/SeFeKI3pLJEpSly4 8ySw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=hMmvLEA9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js4-20020a17090797c400b007165339eb13si4232087ejc.624.2022.06.13.01.40.37; Mon, 13 Jun 2022 01:41:02 -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=@linutronix.de header.s=2020 header.b=hMmvLEA9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239899AbiFMIaQ (ORCPT + 99 others); Mon, 13 Jun 2022 04:30:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240133AbiFMIaG (ORCPT ); Mon, 13 Jun 2022 04:30:06 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 015841EEEE for ; Mon, 13 Jun 2022 01:30:05 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1655109004; h=from:from:reply-to:subject:subject: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=6YfnLzYsqZtamSjbgNwE+1ANi1MPYoPaKZoAdpL94tw=; b=hMmvLEA9wdH4JtDJgIxNxkW2RXXNNGD8Lr77myJVcqgaQ63kOnywlv0jw6uxfeP46TUdI/ 1TMf8TFZiecKgBBYJe1epnQSfxYGBvuWZui8dlkAbwsGnFCtMdUSqnBo+7cpH2b9iVHec7 fW4aymmZXiD+Y8IJbFPmg70Mqnz9p+qLrGWkO+6QxGiAfeiUpFqlw3/FBcaRGrmbJSWfWs zSvMNsUfOSMihPMQdWDcujqv89AVPaajgxtsEY0+aumTkEHoP6PgPqLRKkUX/UU7bqGJkL nfhAUb1LAvIghjXQNW1VhLZmjV6waAO+4Zr4rjZw1cT8OGNV2AsLO74pQ1Ib0Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1655109004; h=from:from:reply-to:subject:subject: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=6YfnLzYsqZtamSjbgNwE+1ANi1MPYoPaKZoAdpL94tw=; b=2oMoKyLTPflIXvN07qwsObNwKxLTDbvA8y9Jb7G9YBK/VlwEC+s+JMYPZ/LVx/9DuoRTkC ckDyn8X8BQQEwCCQ== To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Petr Mladek , Peter Geis , Linux Kernel Mailing List , "open list:ARM/Rockchip SoC..." Subject: Re: [BUG] Threaded printk breaks early debugging In-Reply-To: References: <87y1y48spg.fsf@jogness.linutronix.de> <8735g9mqo0.fsf@jogness.linutronix.de> Date: Mon, 13 Jun 2022 10:36:04 +0206 Message-ID: <87wndlge43.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,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 On 2022-06-13, Sergey Senozhatsky wrote: >> > Should a situation when we have only one online CPU be enough of a >> > reason to do direct printing? Otherwise we might not have CPUs to >> > wakeup khtread on, e.g. when CPU that printk is in atomic section for >> > too long. >> >> IMHO, no. Especially in that situation, we do not want printk causing >> that atomic section to become even longer. If the machine has entered >> normal operation, we want printk out of the way. > > At the same time printk throttles itself in such cases: new messages are > not added at much higher pace that they are printed at. So we lower the > chances of missing messages. That is true if there is only 1 printk caller. For SMP systems with printing handovers, it might not help at all. I firmly believe that sprinkling randomness into printk (i.e. system) latencies is not the answer. We need to keep printk lockless and out of the system's way unless there is a real emergency happening. This particular thread is not about missed messages due to printk not "throttling the system", but rather the kernel buffers not getting flushed in an emergency. This, of course, needs to be properly handled. John Ogness