Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp313239pxh; Wed, 10 Nov 2021 02:10:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzes7q1sfiC4YvgAgNUphrLWF5DQ/klLgi7p4Xd4ERfeJWvdzXJpb4ECEEBvIXLmxgIIFLp X-Received: by 2002:a05:6e02:12e5:: with SMTP id l5mr10679739iln.36.1636539004831; Wed, 10 Nov 2021 02:10:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636539004; cv=none; d=google.com; s=arc-20160816; b=ds6S6oeQmmZgj6/MaaDNlOGO/8OgXtrPxe56yydrC89f2+P7hhhGYx9IHCE1MI0iCz Ti5w8DhJbWY06i4S4NMx6G1ZVUwSteVMeW3ig5BTt6XPG8uAPOTu20jTRi7ifJzuuZTw cwOVtimT18Qc/K6xXqyU+3lig6slxy6KXat3s/MyEmg5jWDm8SyHUzhSKsmIuGP35uck 3v45fN5NDIEOE7c8YwzILUUX+Z7pRpyFDIH+QeOCi+sce4xR6y2Qufdkames/4tolYjq JGKg9SdMSYgEoteNe99iXc9c9dwgKRr+H4SrED4kWPIiA3iSXgYYfcMpUWt7rReTJKZP M0FQ== 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=6H3iJsYLymZGZdTTPIwaF3WwOUQj7EWnfPhR6PY5oWA=; b=ck259F5CqfDEyErKP7qB5kfRbViWJYhsC9MdoWSj9fQFmAlFJR8S3UCZK9LrDfGHvE sUyf8BZxbqNlmmXjyNimkvkxuS/AgF4cd1HrIbu67Voy2vzrnL9yEn1A9XUQ5NuU1D8N JtuUmIr8KqWwNkZBL4V6Ea4Ljdol2sw7/hx2Fu2hjPPdRvRNIRkSW4zgXVepG7fRCqTv xGAJYvMYHpWyQdK/G/oklKxn6kfi2O27DFu/QKR2kMJkfiIqQ3zHXsKTWacRllidlYr3 WSLVpZ17pVFTZVM+ctg9fHmDAJgxYl0tkj8Klh/QJezdPkzUvkuqvROIo/aDxckUWkc3 MkZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=i97ffLNg; dkim=neutral (no key) header.i=@linutronix.de header.b=ee6Y2TYL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n20si16310453jaj.117.2021.11.10.02.09.52; Wed, 10 Nov 2021 02:10:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=i97ffLNg; dkim=neutral (no key) header.i=@linutronix.de header.b=ee6Y2TYL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231126AbhKJKK1 (ORCPT + 99 others); Wed, 10 Nov 2021 05:10:27 -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