Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2190040pxb; Fri, 5 Mar 2021 09:15:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJweu2S2Jyr1NufajNHOjx31x10quEZurNQi3YyMtMdaHHF8J6XqgEmrnJmp91/GnAx89RAk X-Received: by 2002:a17:907:a06b:: with SMTP id ia11mr3121167ejc.294.1614964514168; Fri, 05 Mar 2021 09:15:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614964514; cv=none; d=google.com; s=arc-20160816; b=x4PxMFNwkPEUrDLmL1E06ekR29oemOqT/6FgN+/EnE4aPvPc3lqruTCY1xc7Nb/u38 7LhZJpo/GHaGmtNbIU+/nGB5t7D+9zMrV60gKW2q7zi+GD/WfcrTvWqm/RlJR2BL0yuS 53ymAdGwL0qMPM9AULUgEo84Hytn42F45NtZ/sPplCpY2JRPLGxAp2L/UhzzzbzLVWHS yXTfLxUdHh1iAtAMa002rnxBJG2ZAhO7MKu/1FWrGC1GKpbO2hqIElZ6sO3d/fEzTscA gMwstWxfxYqbaRc9rJVOkfP1h3pjsMsmPvIoOduxDw6QG/1YHxTKktzo2HiSQqoCu29H t4HA== 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; bh=PEnb5Z/RWrI1hxxFFyVPtZ2jx/yfrrIeqjDZv0kbxL8=; b=Z2NRQrhTEO8kaJyR46ZPfA2kN129Sa/T02CiSj+n875XvbuiROrJfe1hVfUOGAlvFs B4tsbMvtyrAonGdp1xSAvMrzOJwK3V+QUwaZAfvSyd4PB44mC4F9YpUj9fpno8rxQeU/ 7w/OwJgfGULj4JaTIaps+gFcDG/iT/7/6TfJN4f/jG2e2Ub9eLz6kcAE/4NUCx+n/muU ImxW4eWd21ZiOhWmm7MbWW0zNgmpfEUBtvS8HaND7K9vMliEnsEdi/lVfj0iBzbEnCDI kSiXC42g/cspA9pfbzGVmi3mUSom8AVgO2FAT7K9N6Xj6P/gXf2bRc1x4SIcuYt1bTlw XwGw== 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 r22si1662261edx.137.2021.03.05.09.14.48; Fri, 05 Mar 2021 09:15:14 -0800 (PST) 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 S231390AbhCERLn (ORCPT + 99 others); Fri, 5 Mar 2021 12:11:43 -0500 Received: from foss.arm.com ([217.140.110.172]:57376 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231520AbhCERLR (ORCPT ); Fri, 5 Mar 2021 12:11:17 -0500 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 8310711FB; Fri, 5 Mar 2021 09:11:17 -0800 (PST) Received: from e107158-lin.cambridge.arm.com (unknown [10.1.195.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6835C3F766; Fri, 5 Mar 2021 09:11:15 -0800 (PST) Date: Fri, 5 Mar 2021 17:11:13 +0000 From: Qais Yousef To: Valentin Schneider Cc: Peter Zijlstra , tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, bigeasy@linutronix.de, swood@redhat.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, ouwen210@hotmail.com Subject: Re: [PATCH v4 15/19] sched: Fix migrate_disable() vs rt/dl balancing Message-ID: <20210305171113.lumrv4m5zdaqhxwn@e107158-lin.cambridge.arm.com> References: <20201023101158.088940906@infradead.org> <20201023102347.499155098@infradead.org> <20201226135445.gkxfn5lmbxhblnj4@e107158-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/05/21 15:41, Valentin Schneider wrote: > On 05/03/21 15:56, Peter Zijlstra wrote: > > On Sat, Dec 26, 2020 at 01:54:45PM +0000, Qais Yousef wrote: > >> > >> > +static inline struct task_struct *get_push_task(struct rq *rq) > >> > +{ > >> > + struct task_struct *p = rq->curr; > >> > >> Shouldn't we verify the class of the task here? The RT task in migration > >> disabled could have been preempted by a dl or stopper task. Similarly, the dl > >> task could have been preempted by a stopper task. > >> > >> I don't think an RT task should be allowed to push a dl task under any > >> circumstances? > > > > Hmm, quite. Fancy doing a patch? > > Last time we talked about this, I looked into > > push_rt_task() + find_lowest_rq() > > IIRC, with how > > find_lowest_rq() + cpupri_find_fitness() > > currently work, find_lowest_rq() should return -1 in push_rt_task() if > rq->curr is DL (CPUPRI_INVALID). IOW, Migration-Disabled RT tasks shouldn't [...] > If you look closely, this is exactly the same as the previous spread > modulo CPU numbers. IOW, this is (again) a CPU renumbering exercise. I don't see it a re-numbering exercise. The way I understand it a system designer doesn't expect their DL task to move because of an RT task. I think we should try to keep it this way, that's why I asked. To be fair, I need to look at the code again and understand where I missed that 3rd condition Peter mentioned. Thanks -- Qais Yousef