Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3863984pxf; Mon, 29 Mar 2021 13:47:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV4sJ4my5emH3LMpgrnmSQZxQtpzMjikqwaRLfoWmDx+CFr48ykqnjtIVVvg+AvP7qUh3z X-Received: by 2002:a50:f9c8:: with SMTP id a8mr30520699edq.270.1617050823108; Mon, 29 Mar 2021 13:47:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617050823; cv=none; d=google.com; s=arc-20160816; b=fJXA28mePp0oC4653DU8arTYW6RmuANws73EUDR89Aqi8jMc195URfWdsry+rnuVTa 9ED8QguoCFh47JV22/vqvDEUt+OwzT+RcoCXmkLQ2kRcqH0+NeZNrZeHWmWpMt0pIH7r zMIA/tVc2gQYK/Z/ssP5rU08QpIvCpnkHXTT+OjhHAKcOWCR6ZgumBcPf5u9mIoJ2YpN PGL4nCZoZcGNmy3KJzt38MyINqHa+EHzDa51DVWF0dAfGY6FkyBuhu5fxCWDbjT38Bev 2BB1aXlc3uQSJ9jwGZzJ7MHn0O3UvAH8YzVwDqEybI56O8meKeM9PrZPtpvPuhkWfJFU XFIg== 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=zzdIA7Tqyx3FWfeIMgfDnt3zetELTcxSkWCFIqnOxeg=; b=zB+MD6PAbwPv8APosWc5QBVB8zFSyY9X6OujwETjf0kskk0hZgLzkuu5aDaL+pf5qT bQHNtCy1Y47vbWDiOyVBPzs4bU0rrkAbEnHniH8/yuta/E0njNZMXZmTENDht+p+/BUa 63s8gDc5kKFSzrfEdkOT6WxPKH7O9LbbKBZ6qDc3n4t/vlBZLlryc+bQIbRoxFPTI+sK kKczHAF46Bqg5T7PX5F/L4a7wC5QQSRdO/qpYxc9lZjOf0FEyksiC0LQE65Tb7SJwcB5 qVt6hEh2KMKsMIbY7HfmU3h2jbGDgT3poztbIG0P49EW7rni+dp3gF05Yb+eBOtqLoFE lYng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=t5krLasI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=bBXxAsOA; 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 e26si13493351ejy.207.2021.03.29.13.46.40; Mon, 29 Mar 2021 13:47:03 -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=t5krLasI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=bBXxAsOA; 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 S231349AbhC2UoV (ORCPT + 99 others); Mon, 29 Mar 2021 16:44:21 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:39104 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbhC2UoN (ORCPT ); Mon, 29 Mar 2021 16:44:13 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1617050652; 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=zzdIA7Tqyx3FWfeIMgfDnt3zetELTcxSkWCFIqnOxeg=; b=t5krLasIZPDSx1tgbcTmmecuFI3Kp6NaS65Ru+gwKkDId0fuKJCXv7v66/oMyGQtbC4lZ2 XOuSaYrjINSIqyzkSNdwAh9dflIcIA5Eo7mVSvFy9EPZ4KwjwLHSe4SHUQAT+LJYnjeEN9 PxRNHit1trheXc4AOY25z6PkrJnR6Ha0PNWYjcHyhWjJ1AeCY5PdeWCh2o3AJJZxZi0Rs3 XbCWVj+/jXpIfrMvRVQnuPax8oFsFVa8+SBpSC4MgDGWlhAJa6K1569WovHUch1J+kKwqQ EHUmqj2H3bU7ic5pxkURLxlrVsQvuUoLvhc6p8Up0uQfB8liXZCH6ecvW8HYQQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1617050652; 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=zzdIA7Tqyx3FWfeIMgfDnt3zetELTcxSkWCFIqnOxeg=; b=bBXxAsOADktXWj2MGiVk11NqrYTy0Sj8N0yhPfRE3blwPn7ekCnuPZvaEikcTiInFXCGeh zgy397NDr8w/IEAA== To: Waiman Long Cc: linux-kernel@vger.kernel.org, David Woodhouse , Marc Zyngier , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Petr Mladek , Sergey Senozhatsky , Andy Shevchenko , x86@kernel.org, John Ogness Subject: Re: [PATCH v2] x86/apic/vector: Move pr_warn() out of vector_lock In-Reply-To: References: <20210329005236.1218-1-longman@redhat.com> <87tuoub07f.ffs@nanos.tec.linutronix.de> Date: Mon, 29 Mar 2021 22:44:11 +0200 Message-ID: <87czvh7kro.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Waiman, On Mon, Mar 29 2021 at 15:57, Waiman Long wrote: > On 3/29/21 8:42 AM, Thomas Gleixner wrote: >> On Sun, Mar 28 2021 at 20:52, Waiman Long wrote: >>> It was found that the following circular locking dependency warning >>> could happen in some systems: >>> >>> [ 218.097878] ====================================================== >>> [ 218.097879] WARNING: possible circular locking dependency detected >>> [ 218.097880] 4.18.0-228.el8.x86_64+debug #1 Not tainted >> Reports have to be against latest mainline and not against the random >> distro frankenkernel of the day. That's nothing new. >> >> Plus I was asking you to provide a full splat to look at so this can be >> discussed _upfront_. Oh well... > > That was the full splat that I can see except the following trailing > data: I meant: Just the splat without yet another eyebleeding patch. >>> [ 218.097985] 6 locks held by systemd/1: >>> [ 218.097986] #0: ffff88822b5cc1e8 (&tty->legacy_mutex){+.+.}, at: tty_init_dev+0x79/0x440 >>> [ 218.097989] #1: ffff88832ee00770 (&port->mutex){+.+.}, at: tty_port_open+0x85/0x190 >>> [ 218.097993] #2: ffff88813be85a88 (&desc->request_mutex){+.+.}, at: __setup_irq+0x249/0x1e60 >>> [ 218.097996] #3: ffff88813be858c0 (&irq_desc_lock_class){-.-.}, at: __setup_irq+0x2d9/0x1e60 >>> [ 218.098000] #4: ffffffff84afca78 (vector_lock){-.-.}, at: x86_vector_activate+0xca/0xab0 >>> [ 218.098003] #5: ffffffff84c27e20 (console_lock){+.+.}, at: vprintk_emit+0x13a/0x450 >> This is a more fundamental problem than just vector lock and the same >> problem exists with any other printk over serial which is nested in the >> interrupt activation chain not only on X86. > > That is true. This problem is more generic than just that. I am hoping > that the new printk rewrite may address this problem. I have been > waiting for a while and that work is still not upstream yet. So what is > your current timeline for that? If that will happen soon, I probably > don't need this patch. I send this patch out as I am uncertain about > it. Timeline? You know how kernel development works, right? >> But, because I'm curious and printk is a constant source of trouble, I >> just added unconditional pr_warns into those functions under vector_lock >> on 5.12-rc5. >> >> Still waiting for the lockdep splat to show up while enjoying the >> trickle of printks over serial. >> >> If you really think this is an upstream problem then please provide a >> corresponding lockdep splat on plain 5.12-rc5 along with a .config and >> the scenario which triggers this. Not less, not more. > > I will try to reproduce this problem with an upstream kernel. Yes please. Thanks, tglx