From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 444ADC433F5 for ; Thu, 11 Nov 2021 08:28:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCDDE6109D for ; Thu, 11 Nov 2021 08:28:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DCDDE6109D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 307196E95A; Thu, 11 Nov 2021 08:28:05 +0000 (UTC) Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id BEA816E95A for ; Thu, 11 Nov 2021 08:28:03 +0000 (UTC) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1636619281; 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=fhZvEsWQota4q77s+urSnI/dc/KS4PVviHnz9T+ZBLI=; b=zxeCK3x2qPG1H0FI+d02YQKAzXvODf+N0FcmajK0bIiT8YksXK+jPHZUr7Fkt5Mg2OI1IU m3MHqGYDTcBazKiapSpDkUw8XEyrrij2XvCgNYrr8A4px09a2Usk1mK3l75kJjzg53s/03 osCXpF71fnqT5SBQA1ZUCJkdMP71du3egG24JgIZ5+EYHp56OQTPWlQDmwqzkQRU6BTe6w aY7bVT8Wuzi9KSHnQplpL+pW4esIhhednxIDnttsR+xbrHS6xInlKOp8EFEpX0cJx4r+p3 ITSc2lUk65ua42lYTvllKvP8YnO1906EZ9cA2UVKx7DwliS0PIEgErwSFPfpnw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1636619281; 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=fhZvEsWQota4q77s+urSnI/dc/KS4PVviHnz9T+ZBLI=; b=8olYsRkMhkQVAaV/05y5wam89kU1Av69szldbJaSE09rlzjgSzB6WcLdDEC0HqXeSstmKA vBAGvvTfgD+XjHCA== To: Sultan Alsawaf Subject: Re: printk deadlock due to double lock attempt on current CPU's runqueue In-Reply-To: References: <20211109213847.GY174703@worktop.programming.kicks-ass.net> <87fss4wcgm.fsf@jogness.linutronix.de> Date: Thu, 11 Nov 2021 09:34:00 +0106 Message-ID: <87k0hfqepb.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Peter Zijlstra , dri-devel@lists.freedesktop.org, Ben Segall , Vincent Guittot , Anton Vorontsov , David Airlie , Ingo Molnar , Mel Gorman , Petr Mladek , Kees Cook , Steven Rostedt , Dietmar Eggemann , Tony Luck , linux-kernel@vger.kernel.org, Sergey Senozhatsky , mkoutny@suse.com, Thomas Zimmermann , Colin Cross , Daniel Bristot de Oliveira Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 2021-11-10, Sultan Alsawaf wrote: > On Wed, Nov 10, 2021 at 11:13:37AM +0106, John Ogness wrote: >> Even after we introduce kthread printers, there will still be >> situations where direct printing is used: booting (before kthreads >> exist) and shutdown/suspend/crash situations, when the kthreads may >> not be active. > > Although I'm unaware of any ongoing kthread printer work, I'm curious > to know how a kthread approach wouldn't employ a try_to_wake_up() from > directly inside printk(), since the try_to_wake_up() hit from inside > the fbcon code is what caused my deadlock. The kthread approach triggers irq_work from printk(). The kthread printer is then woken from the irq_work. John Ogness