Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3937210pxu; Mon, 12 Oct 2020 05:27:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyByctq8lD5BHl1vWQ/SLSXqStez5fcZfNv2hIwhPhiu+nDC67ivr7/XmmA5PWIdfC5Hlcj X-Received: by 2002:aa7:cd93:: with SMTP id x19mr3790394edv.183.1602505633074; Mon, 12 Oct 2020 05:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602505633; cv=none; d=google.com; s=arc-20160816; b=wlMTAGyk2bGQh4ejV5Afdl6UNEh9CBiAi9xdkFj6x3JBHz3PVAr7W9Hh05cqQVWytz IkwZfvWEWx4Onh4xGoLHzqOsSRrHJ9zovP/hH051ZvMTOW+7NpiVqAX5RJGh4IQLeAdd 4kE+4CocWEmm31Nh5JMjKyFoYG8xuWygvqMpdxxTZUnfbzhoufoWP6AWvZyeVo4qenwf mnQjGMeJ9Xoe3OJ170Fal/9j3lbymRZy+RemkuCkbZhCevPzvttsZMnkGyTfx2QY6Gw2 pKufCNZHny1D8TRW3xEIHibzhcGEHT4PG+QJcru5L6nKiFrdxk8PhF8upZgAK4bFmRwy WmXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=EyJYWymuB0damhlgl9tliORc1rudELBdt53nbPt946k=; b=qTPKa3LKvW3jmrGeWG/CT7wi8FQ4/tFSq1eFMIIzgtgupgQ75RS+i8wTmwLcKxL73r 3PwBTwgIfURrHpBZV0bTeq8yxmSR352BDGIaycqQ/yGp+6eboY+rcaBuMCZiFnBCaboo l0sVpZ7zlyBC+N4fbbq7Qc0vDtfyvHAq7/qVYjg6/1Ktgl6CabfxMOofO17UnMd6ob6S uPxkacgzsj4VmxI5hF0ziaelRJ4O5ALfrQJluQgRxcslJLFu57E4da+mmE+j/PZoZs60 lhJPXeODiaTl2GlqnyxQ9LL+n+ucXW8R+dTT5AzzZNRnTkIt0//85jGhBawU6nL7xYAH juMw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zh8si13702868ejb.123.2020.10.12.05.26.49; Mon, 12 Oct 2020 05:27:13 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388462AbgJLMXD (ORCPT + 99 others); Mon, 12 Oct 2020 08:23:03 -0400 Received: from foss.arm.com ([217.140.110.172]:42242 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388334AbgJLMXC (ORCPT ); Mon, 12 Oct 2020 08:23:02 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3752BD6E; Mon, 12 Oct 2020 05:23:02 -0700 (PDT) Received: from [192.168.178.2] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 67E113F66B; Mon, 12 Oct 2020 05:22:59 -0700 (PDT) Subject: Re: [PATCH -v2 15/17] sched: Fix migrate_disable() vs rt/dl balancing To: Peter Zijlstra Cc: tglx@linutronix.de, mingo@kernel.org, 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, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vincent.donnefort@arm.com, tj@kernel.org References: <20201005145717.346020688@infradead.org> <20201005150922.458081448@infradead.org> <54bebe28-1d6d-5f71-da57-deb2eee111d3@arm.com> <20201012112824.GU2628@hirez.programming.kicks-ass.net> From: Dietmar Eggemann Message-ID: Date: Mon, 12 Oct 2020 14:22:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201012112824.GU2628@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/2020 13:28, Peter Zijlstra wrote: > On Mon, Oct 12, 2020 at 11:56:09AM +0200, Dietmar Eggemann wrote: >> On 05/10/2020 16:57, Peter Zijlstra wrote: >> >> [...] >> >>> --- a/kernel/sched/rt.c >>> +++ b/kernel/sched/rt.c >>> @@ -1859,7 +1859,7 @@ static struct task_struct *pick_next_pus >>> * running task can migrate over to a CPU that is running a task >>> * of lesser priority. >>> */ >>> -static int push_rt_task(struct rq *rq) >>> +static int push_rt_task(struct rq *rq, bool pull) >>> { >>> struct task_struct *next_task; >>> struct rq *lowest_rq; >>> @@ -1873,6 +1873,34 @@ static int push_rt_task(struct rq *rq) >>> return 0; >>> >>> retry: >>> + if (is_migration_disabled(next_task)) { >>> + struct task_struct *push_task = NULL; >>> + int cpu; >>> + >>> + if (!pull || rq->push_busy) >>> + return 0; >> >> Shouldn't there be the same functionality in push_dl_task(), i.e. >> returning 0 earlier for a task with migration_disabled? > > No, deadline didn't implement HAVE_RT_PUSH_IPI. Right, so 'is_migration_disabled(next_task) && !pull' should never happen then (for RT and DL).