Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1399600pxp; Thu, 17 Mar 2022 08:38:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXmV4D2TocfMEmYcIYz0Ayz40dUpgkLgHMCHsKtUN0CE5eJU0HHj+aQ0E6rD7r+eRcG/45 X-Received: by 2002:a17:902:ea0e:b0:152:7cf:1b8a with SMTP id s14-20020a170902ea0e00b0015207cf1b8amr5741491plg.4.1647531502840; Thu, 17 Mar 2022 08:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647531502; cv=none; d=google.com; s=arc-20160816; b=VjFpmTXJMkdc2zRwuLOeugR2KjY+sStX6PGtwNqn4XGNJpak5swGP2napb57SP5Yla QSycUNPXK7Z/qJuEC3xmnzkGf6ow9e5ljkr4Wxp/7aY+qN6AFX3RLnUjmYvVU9wJMTrC DznqaIGZYGxHtlR/UVYjco2XV0bNHjTCzRpy0xYtIr/8FfqkMsXgBelG5pI4xKNAsDoM ojHKBRQeELgAnyGI33USrf9KikuBmuWCBmTWcIIb1F+CyXwZ+oUq7zh8ub7GPIFV1x3M wP5fC3ySvsYLpZ57O5z13MmDE9GZK3eDTPhmY0L8cOqkEOsaqANpyKRwCQSgcC2+cjan ZaOg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=MepqDHztiF6xYCqoADcvfLMjE+02llNf194zsZ8IG8A=; b=f86zLOYe8AkwhEzw+UaJCbJ/fEMPK7vUyHq09aiqL+qqeTC6gCr3TIrajhGJtJPnVz SoVcNBL2GPxj6t412fsbV7jyJpi+n13GWcAbMb6u7+AVDcheDiWalOBqZn/2zBaSaLVz hzODl+gqV1iHKlXmNpD7N4w36StpO+mlHogarxFNxiwQH1TPSZV0qHYwqZnk6UGgQVtt kTn++swyaiUnoGW8soto13mncsB6g8Bjo9Wb7ZJfOcQzV1vrvcsvJioc5ZfdJt2hqVQI VToRMik0ydKmBQdbWAEtgAJdhe6JXt+4gILu/9fBXzpEr1KRgF2BCsNx3clkrsUcxRdS VxpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PEuLm50m; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j2-20020a170902da8200b00152070a0883si5146741plx.500.2022.03.17.08.38.05; Thu, 17 Mar 2022 08:38:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PEuLm50m; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231280AbiCQMJh (ORCPT + 99 others); Thu, 17 Mar 2022 08:09:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233378AbiCQMJf (ORCPT ); Thu, 17 Mar 2022 08:09:35 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6CD3DEAF for ; Thu, 17 Mar 2022 05:08:18 -0700 (PDT) Date: Thu, 17 Mar 2022 13:08:15 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1647518896; 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=MepqDHztiF6xYCqoADcvfLMjE+02llNf194zsZ8IG8A=; b=PEuLm50mHnPHzU9aKsysMc+blrmD8kIyA5+Q8/dmX3l3C9L7SboXaVmC9hKAu5tKQISnUU ajY/F+wyB5PX9pkAlflzAylhAhbLQisK3iCV+UCw2O192dsQadEpq274AI4AmOhNGllmwL 5fSrk3ouJ8w7YTTu+uEcOzSXAVDCpGK+UQhLVda+9NnRnBgLKNhDgXzJikmFJitKPSXApZ n2azRf+bJt0o4HI6iISRKoWMQXPZfR4e1EBXNrsbdmCZC6H/KANEWJF1yt/tfpJQpJrnn5 n9QsH/HOs1uRmgTjiMutHPVZ3+De5Qx41Rf4EbjSVVZxuqa/Y5Pw5wIv1OF1rg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1647518896; 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=MepqDHztiF6xYCqoADcvfLMjE+02llNf194zsZ8IG8A=; b=/ftT1ZppCKCnkXZUEjPVF6Coic+WPvlvbNB8zSxoyeUHTqfe+qcHhPo8SVtsTCO0LcJmyj ir9vdzS7fvR8+2Dw== From: Sebastian Andrzej Siewior To: Peter Zijlstra Cc: Steven Rostedt , LKML , Thomas Gleixner Subject: Re: sched_core_balance() releasing interrupts with pi_lock held Message-ID: References: <20220308161455.036e9933@gandalf.local.home> <20220315174606.02959816@gandalf.local.home> <20220316202734.GJ8939@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220316202734.GJ8939@worktop.programming.kicks-ass.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-03-16 21:27:34 [+0100], Peter Zijlstra wrote: > Now, we only do queue_core_balance() from set_next_task_idle(), which > *should* only happen from pick_next_task(), and as such the callback > should only ever get called from finish_lock_switch() or the 'prev == > next' case in __schedule(). > > Neither of these two sites holds pi_lock. I've been trying to reproduce it and didn't make it. I see only the idle/scheduler path. > This is about as far as I got explaining things, and it being late, it's > about as far as I got looking at things. > > Now that also makes conceptual sense, we only want to pull a core-cookie > task when we're scheduling an idle task. > > Now, clearly this gets triggered from the PI path, but that's not making > immediate sense to me, it would mean we're boosting the idle task, which > is wrong too. Looking at the idle task, it shouldn't be possible for !RT due to lack of boostable locks and I don't see anything sleeping locks here on RT either. > So it would be useful for someone that can reproduce this to provide a > trace of where queue_core_balance() gets called, because that *should* > only be in __schedule(). I failed so far. Sebastian