Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp215059pxb; Tue, 15 Feb 2022 11:40:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0CMNqRxC+p3ElMndwVZXMsFqr1Pd3M2NymBd6+KZ2ZLmund+22uQaVicW8hHXDcVk54fm X-Received: by 2002:a05:6402:1395:: with SMTP id b21mr483562edv.305.1644954044953; Tue, 15 Feb 2022 11:40:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644954044; cv=none; d=google.com; s=arc-20160816; b=lQWArKq7E1zzm0kkWD75bYNi+PBhcpOExdAe3izXc/XxGGXGsJyLHa9I/54jkLt5r1 0+19r0wESij5jFXryzXmSPMLeB5yQA6qLN/kxMeRK6oJ33gOp4hCt+xkcTDqC3zfRrBf MzK2p+HqrAOHEGbS67tVAUyRExZ6WmZZKpHGFUOGwCokGlq5GvxXo6Lp1FQuIos7zYH/ zgEz4O/KUsITL3qBrjQvLdDclLabQRFx3JlvG5fDbF8bfwqGCho5nTiIoOMriYgrv4uo VS0OPdcQCsreeJhJX9H8lRANKawHRJnzn3kYduRnuoW4MbgUkgGAzwN3BZXsvjzqNLGo qTyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=IIiuSFZUK7xwdnAT2lnBQFIz4zvUPa4xRWS3d7Ce9VA=; b=VUXoPQ0SCMBDb6FOeoxtaCXOrmyeVTf/BdQZtdwsitpiSjLuFFnebfFagOv4f1nLrt RJSwh7CvwFTLTKAyfXMAEOrdkrU0Jq6mY9P8Nq+baFhDYWcKNv/nOCH3ISO3ilLtCsPS CzSI9leA+fW+s32DvFGp+omdp9O/1hlhse8SIByuwrlLhZgjuerDv8tR0bsNKv4jhfe+ 8Veqrx2ozvyYV8PtkvF1cJ/gGXEl6JQofXFU77QR4SDY47kfntOaOL8cu6qJNKUvJll5 r9yaQzq+qHzbn6NbOlNQ2Xt41FRFmaNuhDQv1SKHd20kpHM9II3zMoSroMHbXIdxLPjy lZaQ== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k4si487895edx.338.2022.02.15.11.40.22; Tue, 15 Feb 2022 11:40:44 -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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238082AbiBONGe (ORCPT + 99 others); Tue, 15 Feb 2022 08:06:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235315AbiBONGd (ORCPT ); Tue, 15 Feb 2022 08:06:33 -0500 X-Greylist: delayed 1231 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 15 Feb 2022 05:06:20 PST Received: from gateway23.websitewelcome.com (gateway23.websitewelcome.com [192.185.50.250]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF945A1BD7 for ; Tue, 15 Feb 2022 05:06:20 -0800 (PST) Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 47E60151588 for ; Tue, 15 Feb 2022 06:45:47 -0600 (CST) Received: from gator4132.hostgator.com ([192.185.4.144]) by cmsmtp with SMTP id JxBJnZj5r9AGSJxBKnQxnm; Tue, 15 Feb 2022 06:43:46 -0600 X-Authority-Reason: nr=8 Received: from host-95-232-30-176.retail.telecomitalia.it ([95.232.30.176]:59430 helo=[10.0.0.45]) by gator4132.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nJxBI-0004fI-DT; Tue, 15 Feb 2022 06:43:44 -0600 Message-ID: <45179cdb-2391-207a-2f7b-2dea828d1606@kernel.org> Date: Tue, 15 Feb 2022 13:43:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [RFC V2 12/21] rv/reactor: Add the printk reactor Content-Language: en-US To: John Ogness , 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 References: <10cf6003-6d2b-056b-11bb-3ae9c342a369@linuxfoundation.org> <87v8xg30qc.fsf@jogness.linutronix.de> From: Daniel Bristot de Oliveira In-Reply-To: <87v8xg30qc.fsf@jogness.linutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4132.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kernel.org X-BWhitelist: no X-Source-IP: 95.232.30.176 X-Source-L: No X-Exim-ID: 1nJxBI-0004fI-DT X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: host-95-232-30-176.retail.telecomitalia.it ([10.0.0.45]) [95.232.30.176]:59430 X-Source-Auth: kernel@bristot.me X-Email-Count: 2 X-Source-Cap: YnJpc3RvdG1lO2JyaXN0b3RtZTtnYXRvcjQxMzIuaG9zdGdhdG9yLmNvbQ== X-Local-Domain: no X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE autolearn=no 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 2/15/22 11:03, John Ogness wrote: > On 2022-02-14, Daniel Bristot de Oliveira wrote: >> On 2/14/22 18:25, Shuah Khan wrote: >>> On 2/14/22 3:45 AM, Daniel Bristot de Oliveira wrote: >>>> Note: do not use this reactor with rq_lock taken, it will lock the >>>> system until printk can handle that. >>> >>> Please give more details on "lock the system" and how locking >>> would impact users and system operation >> >> It is a deadlock on the rq_lock. Hopefully the new printk >> implementation handles that better. > > 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? -- Daniel > John