Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp603724pxb; Thu, 26 Aug 2021 10:02:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybWtvt/twXLQ4yXGfvEqgW6ed/PGuvy6iXCu9L2rkZPDjaRIHiGxLqnRo4wervOO0uGtva X-Received: by 2002:adf:e645:: with SMTP id b5mr5207463wrn.34.1629997362507; Thu, 26 Aug 2021 10:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629997362; cv=none; d=google.com; s=arc-20160816; b=o7mTcxGCGOZmlC++Oey+YpCfe50LUE7jnDmf/DrSNaBDM2CVY8sXkn7fzMuxHDfjzi itT/l0993wX2sSRMuZiwkCEV6sQbhbkD1tvOr1Xoq7j1IM7xEaQjmkVlH+RqeSzIziCQ wcYueEw9EhWBWFece8k/4OSpTxPKL7UgKfcLM+kgVHuWv7hl2o4qd3ZGC7zMz6s8y7F8 zUVsvo9MxreU/zLvIghqXXTRaOe/Q6uJtsjT6bHf8gijX8K9Gzd7Lk5c4V5QmdcNf4EZ W7ygyoMCrS/+kO3IDK1qkM20rks5rk5sF7X/q3TGpiVt1arE7tsKzjPGqBTFcJeJCm/F N5LQ== 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=tWtbvxDbQneua8skOdhQaeTLxmG7GmsaooskC+FoSew=; b=sa4MmMEqbWjOa3dgIHr5CzefhGSRIBKe8DcoC7k3BxNsegz2YrufaABKl5PcHmW3an SnYA0B3de7geHd1pAa4RpBi5tjJEunJ9bMXFBkTmaApFq7k0zHVWls5PfBf/XopJMM/2 v2S7CwNF29IMY6zX8VziWIGNdW7brLCR6xbcYXMN7xabzuf2gKz3iGrfZE7YF04cSVV1 jlzuXvyVE/TF4DvQrBUUZEWWktjRMzyF6ZRbmG0GpT2tWMYe2XMOLi6BvDLIp301fvsH b1gxbQjVxT6haF8go2uz4KhQeQVpCScl9oAeY53CbdZlPdllRv+2z37KV/GHNRBEf6hv PDRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uiXP1vdr; 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 g19si4046597edu.205.2021.08.26.10.02.04; Thu, 26 Aug 2021 10:02:42 -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=casper.20170209 header.b=uiXP1vdr; 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 S231405AbhHZRAF (ORCPT + 99 others); Thu, 26 Aug 2021 13:00:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbhHZRAC (ORCPT ); Thu, 26 Aug 2021 13:00:02 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2985DC061757 for ; Thu, 26 Aug 2021 09:59:15 -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=tWtbvxDbQneua8skOdhQaeTLxmG7GmsaooskC+FoSew=; b=uiXP1vdrHQiBj6mPhTBTSmUahs 82qkmlgnCNoN1BvUrCHw4ZefJzCUd2WSnFbBqeeUbPHrcF9orLwFU0T+ejBw0WOTHzK5qGG1vPBmh nKerlNJYEmbkHYk7f7Mr3A7qEMJzKG5v/yky1dJp1MehovCv6ehgld+8Db3mSm0geCcmaax3PCJ/T s8gHGWKnkXnLpBFCPqKT45kJqE7l4q1iOv1PB8l5jyOy8nYX0cVLOHDC1h4dYBgMdAruyZHihqmHI wZujUx9aaKuHGpYHDsdxjVGp6LgK//1+S1rFsh+j0VTgpRwjCstTywwhyiLMr3BzSOr1IUIdvIxso GIY/TcGg==; 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.94.2 #2 (Red Hat Linux)) id 1mJIg5-00DUZV-Nw; Thu, 26 Aug 2021 16:56:43 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id CDF673008DE; Thu, 26 Aug 2021 18:56:31 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A9C5C29CA38CF; Thu, 26 Aug 2021 18:56:31 +0200 (CEST) Date: Thu, 26 Aug 2021 18:56:31 +0200 From: Peter Zijlstra To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Thomas Gleixner Subject: Re: [PATCH] sched: Fix get_push_task() vs migrate_disable() Message-ID: References: <20210826133738.yiotqbtdaxzjsnfj@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210826133738.yiotqbtdaxzjsnfj@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 26, 2021 at 03:37:38PM +0200, Sebastian Andrzej Siewior wrote: > push_rt_task() attempts to move the currently running task away if the > next runnable task has migration disabled and therefore is pinned on the > current CPU. > > The current task is retrieved via get_push_task() which only checks for > nr_cpus_allowed == 1, but does not check whether the task has migration > disabled and therefore cannot be moved either. The consequence is a > pointless invocation of the migration thread which correctly observes > that the task cannot be moved. > > Return NULL if the task has migration disabled and cannot be moved to > another CPU. > > Fixes: a7c81556ec4d3 ("sched: Fix migrate_disable() vs rt/dl balancing") > Signed-off-by: Sebastian Andrzej Siewior Thanks!