Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4082921pxf; Tue, 23 Mar 2021 02:05:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5jcbzMfiuf8L6SGRFaZcwHR9Qak7GTnNs/0eqQEsrTW7AaBW5KonqUMlpgzeUdOTT11i/ X-Received: by 2002:a17:906:4747:: with SMTP id j7mr3857636ejs.221.1616490358142; Tue, 23 Mar 2021 02:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616490358; cv=none; d=google.com; s=arc-20160816; b=LdJP/pFDR+n3cYtkn+d1FiJtjwOPew4jwFlMD70AdTCqM41EhJrSqRnjIjalA5H2jh /jJPZ0v5dcoGG9Dkv5t2b/Bn0Pesz9Z5ITAkvQl1xnzHed5kEwxou/4ObLvIg8kmChOs ALkqvmu7hujnsM1RmnP/mfeWDxQ95p2xNKNqOeazB3Dt55vGir8595A7MrIjH3TLl4ao VBeBc1aDpKMAonxxmOAi/fMzFzZY71pHFDUzmjJV6WDbOWcymnt988/KAmCMOixrS0Wb Pcgai848QSOQKmO7c4E9umlVvKEolon0PwiwxUYMON6BNH9rJM868dvsOb0LAf7vLFtM 7NQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:dkim-signature:date; bh=GxnyY0C/BL+SWjI1WAMA2hS6FNIin/OZV9pi9TETKDA=; b=UgVPpaYcaUWospDaHb9sg3e2vpTOXf1ZSsBzlhI/hJBnf9LRqEiQ5J2w8bTOQ7iAFk w7iZVBU8oLnzt+O5tD3e07pZ22bwHUhRwGqqsGFQbm8DPyGKgKlgpdqBn+PAsKh1QqHV MqoktPCiWRLwFWoODzOFtQUjVTjq1fz6B86yEZzh7G84QZr60Xo6mtwUAsBT/ETemmP2 V4Vaz5UN3sY9+a6DArI/hAbronjpVIsiWXO61GRKTXqmOZZUTBKjFeVTcRRMdw9uToQG AVP2ne8ss2hjjrwTX36mvXWgN5mJJN9V8f2eUDM86eUa54vLq/WAs8VNl2CIMyY80F25 wBRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jKR8nH7S; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 11si13248700ejy.63.2021.03.23.02.05.35; Tue, 23 Mar 2021 02:05:58 -0700 (PDT) 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=jKR8nH7S; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S229670AbhCWJE1 (ORCPT + 99 others); Tue, 23 Mar 2021 05:04:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbhCWJEQ (ORCPT ); Tue, 23 Mar 2021 05:04:16 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDC2BC061574; Tue, 23 Mar 2021 02:04:15 -0700 (PDT) Date: Tue, 23 Mar 2021 10:04:13 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1616490254; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GxnyY0C/BL+SWjI1WAMA2hS6FNIin/OZV9pi9TETKDA=; b=jKR8nH7Swa4DWx21vuj0HUcMHmuduY2uEBzGACtLxBeZjP4zBpKIatE/K0HTyMnvj+mHb1 sIC6nIodDPCS5IG+jcjYHJlBSqmILOgPaDCgDWJz8+ru+PKFzMsWwq0UxUMsPedVtHReFK 8lF2S/kv80gOutNHKDZhfi5fcWk8ZmcDw4/PL59oGx/gGIEBrcrvP49QEHgYZHMafz+t8M PtgzfVfSAg8Fl8/lR3CBpkb+xJ8ay9MeFtruL28vjuKb2myiRCuW4TS5xUpT+b1aeB57JX fAg8mdDgmZO8RlOcYOce6QVtnJ0pH1bGQ0gJInh8kOEs1b6WU07qxAAKhkJ2zw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1616490254; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GxnyY0C/BL+SWjI1WAMA2hS6FNIin/OZV9pi9TETKDA=; b=q51R+RGcn4T8i7CWIilD8rjF69yvS499TTfLxi4DQ47DkWsSK3/LcE3o/EIDUtTjYOHeLB x39zsZNgCkG7TfDA== From: Sebastian Andrzej Siewior To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Cc: Johan Hovold , Greg Kroah-Hartman , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Nobs , Thomas Gleixner , Peter Zijlstra , kernel@pengutronix.de Subject: Re: [PATCH] serial: imx: drop workaround for forced irq threading Message-ID: <20210323090413.ogeweygw3iejtbsv@linutronix.de> References: <20210322111036.31966-1-johan@kernel.org> <20210322113402.naqzgkoe2xesnw4b@pengutronix.de> <20210322113918.ze52gq54cpsspgej@linutronix.de> <20210322115536.knkea7i6vrfpotol@pengutronix.de> <20210322134032.kmirudtnkd4akkgu@pengutronix.de> <20210322204836.i4ksobvp6hxl5owh@linutronix.de> <20210323073447.r3utxintt5c3blb4@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20210323073447.r3utxintt5c3blb4@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-03-23 08:34:47 [+0100], Uwe Kleine-K=C3=B6nig wrote: > Hello Sebastian, Hi Uwe, > On Mon, Mar 22, 2021 at 09:48:36PM +0100, Sebastian Andrzej Siewior wrote: > > On 2021-03-22 14:40:32 [+0100], Uwe Kleine-K=C3=B6nig wrote: > > > From a strictly logically point of view you indeed cannot. But if you= go > > > to the street and say to people there that they can park their car in > > > this street free of charge between Monday and Friday, I expect that m= ost > > > of them will assume that they have to pay for parking on weekends. > >=20 > > If I hear that parking is free on weekdays and on paid on weekends, I > > expect it to be a scam. >=20 > I don't feel taken seriously with this reply. I'm sorry. > > Uwe, the patch reverts a change which was needed for !RT + threadirqs. >=20 > This would be a useful information for the commit log. >=20 > > The commit message claims that since the referenced commit "=E2=80=A6 i= nterrupt > > handlers always run with interrupts disabled on non-RT=E2=80=A6 ". This= has > > nothing to do with _this_ change. It argues why the workaround is not > > needed. >=20 > It argues why the work around is not needed on non-RT. It might be > obvious for someone who is firm in the RT concepts, but IMHO commit logs > should be understandable by and make sense for a wider audience than the > deep experts. From what I know about RT "Force-threaded interrupt > handlers used to run with interrupts enabled" still applies there. Yes. The commit Johan referenced explains it in more detail. > > If the referenced commit breaks RT then this is another story. >=20 > I'm surprised to hear that from you. With the goal to get RT into > mainline I would expect you to be happy if people consider the effects > on RT in their reviews. Correct, I do and I am glad if people consider other aspects of the kernel in their review including RT. > > > So when you said that on on-RT the reason why it used to need a > > > workaround is gone made me wonder what that implies for RT. > >=20 > > There was never reason (or a lockdep splat) for it on RT. If so you > > should have seen it, right? >=20 > No, I don't consider myself to be an RT expert who is aware of all the > problems. So I admit that for me the effect on RT of the patch under > discussion isn't obvious. I just wonder that the change is justified > with being OK on non-RT. So it's either bad that it breaks RT *or* > improving the commit log would be great. >=20 > And even if I had reason to believe that there is no problem with the > commit on RT, I'd still wish that the commit log wouldn't suggest to the > casual reader that there might be a problem. Okay. I added a sentence. What about this rewording: Force-threaded interrupt handlers used to run with interrupts enabled, something which could lead to deadlocks in case a threaded handler shared a lock with code running in hard interrupt context (e.g. timer callbacks) and did not explicitly disable interrupts. =20 =20 This was specifically the case for serial drivers that take the port lock in their console write path as printk can be called from hard interrupt context also with forced threading ("threadirqs"). =20 Since commit 81e2073c175b ("genirq: Disable interrupts for force threaded handlers") interrupt handlers always run with interrupts disabled on non-RT so that drivers no longer need to do handle this. RT is not affected by the referenced commit and the workaround, that is reverted, was not required because spinlock_t must not be acquired on RT in hardirq context. =20 Drop the now obsolete workaround added by commit 33f16855dcb9 ("tty: serial: imx: fix potential deadlock"). > Best regards > Uwe >=20 Sebastian