Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3147300pxk; Mon, 7 Sep 2020 04:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKOYodbZ4uZcaJdnwvVPGCsF9NdLmToGBSTgpeOObid4pLbQK1wWI3ccp43DCE3JCSi8GD X-Received: by 2002:a17:906:ce3b:: with SMTP id sd27mr20510946ejb.433.1599479132375; Mon, 07 Sep 2020 04:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599479132; cv=none; d=google.com; s=arc-20160816; b=yIobEpVGIOhVaFo0KFABmjXg3BWMqAT6BMOtluJUg+u8WxpKZ0ELh2koebOx5/Nbpk XAblsX7+YdmttXxUp8J4UX+sgiBw1zeFGUaFks6vg9PwiDBJwHFkxMt2mxm2YU6bvUb0 /D/u3L4QSyUbMp5ZoTTcf2ikq2TqrVoYTI6DwlGykEt7x/B50CBzcYD9ASCgQQamcFlZ 9OS+HOwKNy2aM7CWNxUlZ22zFTlogReJeXCpQNkB0ijDKyAK0zu4gr6YaiKr1Lj8s0a9 slL/aAzSDIWuWoO5LLJQ9LRATYzs5HAXMD97H/ag9F2USZ2zgBiJ1lEZlwPmzgC6uYp1 Ljzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=rm9oxznNjP/2X6SfBj8vO24ynHxqiFI25pjhDo578i4=; b=BHGLh27adPkzTvQT6TJLDmLNGaNINRWbw7ibiXjOOF0BUx1HkCbDej6koeAAkSWkl7 QaPKyvvQ3mQSHXUKaIXTEx2rG2i+2F0S+mZUSAC7hMfTG+GEaHk3e7QXELdreBqsxcWf gCGyt+hGw3G9QBIY5hBZGw/3Q2ZyKu32FjHvqeRH1tXEmEdaDz6/K5bvqR+BxbdP5Jwe Azc07edRh4PXKFxNph8/E3dXggguVytEQ5ZczTHT/EjhlKqyHeeNfkJ2RgxX8CyfJfJw cqWcSY1XYAtcAL1qnMNJtaP/vDkC3unViwuMIRaqVKuF2oMSz3q1b9MR6fUWOAddKFcg snbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=pEs8pF1H; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx17si9377964edb.409.2020.09.07.04.45.09; Mon, 07 Sep 2020 04:45:32 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=pEs8pF1H; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729048AbgIGLnC (ORCPT + 99 others); Mon, 7 Sep 2020 07:43:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729056AbgIGLmU (ORCPT ); Mon, 7 Sep 2020 07:42:20 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26805C061573 for ; Mon, 7 Sep 2020 04:42:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=rm9oxznNjP/2X6SfBj8vO24ynHxqiFI25pjhDo578i4=; b=pEs8pF1HhopgJRVc8E7Zn46tvG r6rNdOYeo2nTkvYY/QilgrxUAgLcJgNs3gc8Ca+St8jt/yXk6KorxDC4Cc8I4yjsxVoy6vsa3HEXx /hBDFFE92fePBX1lVexSturP5OED5KMXSfoljHHxYIbdk+w728+R1Q8xfqdMSphIxXUB6WxrdS0gv 2qd4CSDxfv8ShaMo6L29+3YujEBdShwq3syPuqYaquJ2G2VpcMWeIhbRwZ/FVdbDQZ1JPruzpMOKH iF4NDDvb1dpW8nLic43mQdgVKE+SfArDLgdbLncgqb9AETBgtYYnTV/6hilxciWKcTgRWI8jkCegt LdE4g+XA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFFWq-0007KR-Q7; Mon, 07 Sep 2020 11:41:45 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E65FE301179; Mon, 7 Sep 2020 13:41:40 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CA477201057EE; Mon, 7 Sep 2020 13:41:40 +0200 (CEST) Date: Mon, 7 Sep 2020 13:41:40 +0200 From: peterz@infradead.org To: Steven Rostedt Cc: Andrew Morton , Joerg Vehlow , Thomas Gleixner , Sebastian Andrzej Siewior , Huang Ying , linux-kernel@vger.kernel.org, Joerg Vehlow , dave@stgolabs.net Subject: Re: [BUG RT] dump-capture kernel not executed for panic in interrupt context Message-ID: <20200907114140.GQ2674@hirez.programming.kicks-ass.net> References: <2c243f59-6d10-7abb-bab4-e7b1796cd54f@jv-coder.de> <20200528084614.0c949e8d@gandalf.local.home> <20200727163655.8c94c8e245637b62311f5053@linux-foundation.org> <20200821110848.6c3183d1@oasis.local.home> <20200821134753.9547695c9b782275be3c95b5@linux-foundation.org> <20200821170334.73b52fdd@oasis.local.home> <20200822123252.GQ1362448@hirez.programming.kicks-ass.net> <20200822194928.54ee4cb5@oasis.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200822194928.54ee4cb5@oasis.local.home> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 22, 2020 at 07:49:28PM -0400, Steven Rostedt wrote: > From this email: > > > The problem happens when that owner is the idle task, this can happen > > when the irq/softirq hits the idle task, in that case the contending > > mutex_lock() will try and PI boost the idle task, and that is a big > > no-no. > > What's wrong with priority boosting the idle task? It's not obvious, > and I can't find comments in the code saying it would be bad. > The idle task is not mentioned at all in rtmutex.c and not mentioned in > kernel/locking except for some comments about RCU in lockdep. There used to be a giant BUG() and comment somewhere in the PI code I think.. but that's vage memories. > I see that in the idle code the prio_change method does a BUG(), but > there's no comment to say why it does so. > > The commit that added that BUG, doesn't explain why it can't happen: > > a8941d7ec8167 ("sched: Simplify the idle scheduling class") That's like almost a decade ago ... > I may have once known the rationale behind all this, but it's been a > long time since I worked on the PI code, and it's out of my cache. I suffer much the same problem. So cenceptually there's the problem that idle must always be runnable, and the moment you boost it, it becomes subject to a different scheduling class. Imagine for example what happens when we boost it to RT and then have it be subject to throttling. What are we going to run when the idle task is no longer elegible to run. (it might all work out by accident, but ISTR we had a whole bunch of fun in the earlier days of RT due to things like that)