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 1C384C4332F for ; Wed, 10 Nov 2021 10:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00CD9611F2 for ; Wed, 10 Nov 2021 10:07:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231168AbhKJKK2 (ORCPT ); Wed, 10 Nov 2021 05:10:28 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:41954 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230440AbhKJKK0 (ORCPT ); Wed, 10 Nov 2021 05:10:26 -0500 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1636538858; 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=6H3iJsYLymZGZdTTPIwaF3WwOUQj7EWnfPhR6PY5oWA=; b=i97ffLNgZOCzWFBRclG7GYiqXi7MHOrZxbOXgJo0pTV9VaaVPhnG7NnoN6yM3YQF/vW6FC /3gyS9iBsC5urXBvXaYF49NEiCksYHVOTalS1S/1WP1VfMlkHIkSawA/Ap8njZ2dqksKpL LqdnqRoK4lkmtv0Nz56XOk+A2fQ6Qr/lejEAUjmBko0vER8YoFp+rdooaaLKYDMEXhtJoH jx7lE1sPblbEaXau0X5Qe99u1WmUZbWkd/MsTkgcxhkOaB1uhw+41/cBH3eVL3dFXAOQqw J6WbiaGNlGR9igGy7y9MoRYhexo0UfhlV76JID34cVRgrVSIGg+lt80o8j0N5Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1636538858; 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=6H3iJsYLymZGZdTTPIwaF3WwOUQj7EWnfPhR6PY5oWA=; b=ee6Y2TYLMpo7uGsr+qYoymWA2RnXgQ7bpfSm69n5Kv+JYUF4RpPSJ2gC9dckYjRQ6jAAGr HFIj1zE58dGl46AA== To: Daniel Vetter , Peter Zijlstra Cc: Sultan Alsawaf , Anton Vorontsov , Ben Segall , Colin Cross , Daniel Bristot de Oliveira , Daniel Vetter , David Airlie , Dietmar Eggemann , dri-devel@lists.freedesktop.org, Ingo Molnar , Juri Lelli , Kees Cook , linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Mel Gorman , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Thomas Zimmermann , Tony Luck , Vincent Guittot , mkoutny@suse.com 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> Date: Wed, 10 Nov 2021 11:13:37 +0106 Message-ID: <87fss4wcgm.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-11-10, Daniel Vetter wrote: > I'm a bit out of the loop but from lwn articles my understanding is > that part of upstreaming from -rt we no longer have the explicit "I'm > a safe console for direct printing" opt-in. Which I get from a > backwards compat pov, but I still think for at least fbcon we really > should never attempt a direct printk con->write, it's just all around > terrible. Right now we don't have an explicit "I'm a safe console for direct printing" option. Right now all printing is direct. But it sounds to me that we should add this console flag when we introduce kthread printers. > So yeah for fbcon at least I think we really should throw out direct > con->write from printk completely. 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. I will introduce a console flag so that consoles can opt-out for direct printing. (opt-out rather than opt-in is probably easier, since there are only a few that would need to opt-out). Since kthread printers do not yet exist (hoping to get them in for 5.17), I am not sure how we should address the reported bug for existing kernels. John Ogness