Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp84887pxu; Tue, 6 Oct 2020 01:03:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNHCusZ/A5gfQ2SHkcISa26ptxP8d0cuG0i5CN7pO0Lt+75KKj/9H22YRgsCv1cH5jEdxi X-Received: by 2002:a17:907:42fd:: with SMTP id oa21mr3758749ejb.247.1601971431214; Tue, 06 Oct 2020 01:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601971431; cv=none; d=google.com; s=arc-20160816; b=RhGcx8FtPbgLMGADsqCnKucFFtYSz42JNlMt2ZDkSZSAUxnZN7GwQc3AFHfvFDmTPi 4WMDzuUx1GkCOJznMonF3E6agH75+3FzmOdXKmaEpNowvTg1ZV52Y7CU8yVIWkBmDLTx Jax88CQwod0ca1swlyKpIdMMe760eZT7YQc37pYnmB+4ZNqZ/AGg1DwGB2A6DSRH0pQo g9LGsBJ7Kn6cvh92Q4hPDtvmTSf60FSBqJjdJ7YyOsfyrPJJXVIHOhHMiMYVVEWBpl97 Jr8VDETfZiHT1yKtLxYA2e22t0Mceb4nmRjU3yztWSX+wFRl6iHfDsCgBPWK0CKrZG9O gI/Q== 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:date:dkim-signature; bh=weyj1+oVB2sF+RH5dsw1s1tXmXnPwOyJE9YEld1yZag=; b=C9OC/e4zZGQ7j7JVY3qors/fl/wTtdydD11ZBFREz9WHRGF8+vOlEghncVxGd4iNUl /PRg1XfobhWqycCltJkde4KLiO8StfGrKTaSluYcDt9bFH9Tn8FJpoPJ0WQ3aaywZTcv 7kpFwbsK5VLrzXP+igaNJPl6EOoAQg3XsYYFDBv48nqZOCG5/PViz9N9eWhVQ7m7TwQD xNVm9rXGvBOt8/nmQBw4xYszp5cGXmesc1uI49/eVfJOkjC5DNZ9gkswUQP34PfYEPIZ QUr3uOTjAgo9Ho3c2WRVdeDeKjQEGX4Pn9YXIaCfTdXD52pb5DnRS6SmhDDDFTp6g2o/ 8Ngw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=B0IOu1RR; 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 v20si1379539ejg.640.2020.10.06.01.03.26; Tue, 06 Oct 2020 01:03:51 -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=@infradead.org header.s=merlin.20170209 header.b=B0IOu1RR; 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 S1726418AbgJFH75 (ORCPT + 99 others); Tue, 6 Oct 2020 03:59:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgJFH75 (ORCPT ); Tue, 6 Oct 2020 03:59:57 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFDEC061755 for ; Tue, 6 Oct 2020 00:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=weyj1+oVB2sF+RH5dsw1s1tXmXnPwOyJE9YEld1yZag=; b=B0IOu1RR/yddt4XwCdocTUQ1Cz 5QDOemccGMGKREg1N8rG4xjwZRYdrIcX/9Ztdf/5PC2lgnvFTfTP1Z3434Fshf4VNW5flqP55Sr8N 1iW+cWLDcnpkjQmcp+gYxOvdFUI24JR0eqlcP5ObHj9xytBjo98TPcj4azlsW5og82P9lV602IjU7 bR0EZAtv3GfCnKr4Kmv6arnY8f40Qrek2ZlbETOHr9gsEcUt7f0F2+sHL2tuiKyX9vfVVaXSG+0dI fdCISJ4i7rBwW5UlbNgFXAAaGzqdn4pIK0/QmzIxTdnU6AOmmNtARlcaAVha7zesxa4KzBx+HcVrl n+rgOLDA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPhss-0004HY-5g; Tue, 06 Oct 2020 07:59:42 +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 29E1F3006D0; Tue, 6 Oct 2020 09:59:40 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E0C052026833C; Tue, 6 Oct 2020 09:59:39 +0200 (CEST) Date: Tue, 6 Oct 2020 09:59:39 +0200 From: Peter Zijlstra To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, bigeasy@linutronix.de, qais.yousef@arm.com, swood@redhat.com, valentin.schneider@arm.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vincent.donnefort@arm.com, tj@kernel.org Subject: Re: [PATCH -v2 15/17] sched: Fix migrate_disable() vs rt/dl balancing Message-ID: <20201006075939.GL2628@hirez.programming.kicks-ass.net> References: <20201005145717.346020688@infradead.org> <20201005150922.458081448@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201005150922.458081448@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 05, 2020 at 04:57:32PM +0200, Peter Zijlstra wrote: > +static inline struct task_struct *get_push_task(struct rq *rq) > +{ > + struct task_struct *p = rq->curr; > + > + lockdep_assert_held(&rq->lock); > + > + if (rq->push_busy) > + return NULL; > + > + if (p->nr_cpus_allowed == 1) > + return NULL; This; that means what when we're stuck below a per-cpu thread, we're toast. There's just nothing much you can do... :/ > + > + rq->push_busy = true; > + return get_task_struct(p); > +}