Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp112490pxb; Tue, 15 Feb 2022 06:35:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJw176xLAltPOLNw91ITOOjD9tgUVkICRK/RG+tY/G4HaFq2zAEMN2eOd7CHE5HJYaEmaMsw X-Received: by 2002:a17:90b:38cb:: with SMTP id nn11mr4661661pjb.12.1644935758792; Tue, 15 Feb 2022 06:35:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644935758; cv=none; d=google.com; s=arc-20160816; b=JjmYB6biqIIq7ZrGpR5V0u0ZAi/Sn6bpeN3Lcw4rMy6DOFDI5LbxaSdkBvJqWz0D9f G4sQ8a681956FVWoQeboviOu1Lls6cLSqHW8tRnMbPo1HCLh2beLVkApwpBDUTPK2wFu JRV6IeWuKKR4dek/gM2mrmgw4EDhqzSZVKBUfDi6C/mUKZvq1WqGIK5/U2qvFxWD/sR7 VvmAzVmEWqQPUZ66qSrV455LeTk9sUPDoocDY9QPHQ3BjvxBNGw7q/iFRCLoQSmEoGsz qzKS6RomAnfHzHDoFnrTWk5RTLb4gojZwB017xLLtK2vx2MiPMNppzpSln8bIh5/dNvr UpPA== 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=8cywgUur44ULKnZ+xJI0fUY9a++UJX4o2ooMJkUK5y4=; b=dD4zs1vGIBLTYEeh2TBrRTekGW2LnIUoCCP/tNq1Db+Ph3E5DI2c1hw/zQPbxw3vD8 tqs1Iy29SL5N44uZLHztdc+pqTgI2sjew0lXBQCV2JfFvw5U/4cilR1GQxWqwGhoP4vZ ix95mNgbmebVdVxRDEthlpl5JDUbDFo6EiFvFanMIyx6XjZrGhPrD3BTNDCfOXqlNSVr /4WImJyDYE7CvRt/+L5RBedigJTQVjMZ3sm909s9Zx1llnQuoBkIERnqivQWguU9RAFx UEo/IyqUuYxKrR6ygZjDKQqwvbnt2F7L27uHYBabZxTjAI/wJ97oQFw7n8rN3Y+yY5ZC bxZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=2Ilr8ugt; dkim=neutral (no key) header.i=@linutronix.de; 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 h16si462510pfh.345.2022.02.15.06.35.41; Tue, 15 Feb 2022 06:35:58 -0800 (PST) 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=2Ilr8ugt; dkim=neutral (no key) header.i=@linutronix.de; 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 S238264AbiBONdY (ORCPT + 99 others); Tue, 15 Feb 2022 08:33:24 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:58944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiBONdX (ORCPT ); Tue, 15 Feb 2022 08:33:23 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 385B0EF79A; Tue, 15 Feb 2022 05:33:13 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1644931990; 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=8cywgUur44ULKnZ+xJI0fUY9a++UJX4o2ooMJkUK5y4=; b=2Ilr8ugtsic77/WeY9XhAMjCKAi5wvkK+HKFM6zxywO6G8JERK/7jvrmv2vss/C/vDbeN7 I7KP3R0uSzlRmfE3Gm+dnj1VXPMmtZc2aloJaCsD5wR8wWu6IzgJztOI+2BiQ4KQbhrZZA uHKEYDTnKzMolSBEGnhqpVQF3nXVovnaee9JgxouYgqsh+kkZMeG0jNmONgTswxNj4YOYm KlQwhIBW++8FbNWHKdgsSIqrx4vuUrCxYOIGT8vqBQ+7iQ4PSjnjXKXN3V/YvLjgTVYgHr hkXBhetyDD7aAfWnziL0HzrmU4Y79e52mnzCqP+kI7zI3oaqHlzfodNqOlilXA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1644931990; 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=8cywgUur44ULKnZ+xJI0fUY9a++UJX4o2ooMJkUK5y4=; b=eL82VujvHibE/xA7u7NFvubjCi0sbq+twCVJ4q3TbnJLq+JCEykxUyhfTMTsngw4OpnXcn q87UrOhOPXyTfJDw== To: Daniel Bristot de Oliveira , Shuah Khan , Steven Rostedt Cc: Jonathan Corbet , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Will Deacon , Catalin Marinas , Marco Elver , Dmitry Vyukov , "Paul E. McKenney" , Gabriele Paoloni , Juri Lelli , Clark Williams , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-devel@vger.kernel.org Subject: Re: [RFC V2 12/21] rv/reactor: Add the printk reactor In-Reply-To: <45179cdb-2391-207a-2f7b-2dea828d1606@kernel.org> References: <10cf6003-6d2b-056b-11bb-3ae9c342a369@linuxfoundation.org> <87v8xg30qc.fsf@jogness.linutronix.de> <45179cdb-2391-207a-2f7b-2dea828d1606@kernel.org> Date: Tue, 15 Feb 2022 14:39:09 +0106 Message-ID: <87r1842r1m.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-02-15, Daniel Bristot de Oliveira wrote: >> I suggest using printk_deferred() for this reactor for now. With >> printk_deferred() the message and timestamp are immediately and >> locklessly stored in the buffer, and the printing is performed in a >> separate context. printk_deferred() is safe for all contexts. > > Question: Does it always postpone or only postpone when in a > particular contexts, like, with irqs disabled? printk_deferred() always postpones printing. > Note: do not use this reactor with rq_lock taken, it will lock the > system until printk can handle that. Perhaps you could explain thi comment in your commit message? printk() should never lock the system. John