Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5198652ybl; Tue, 4 Feb 2020 09:25:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyxXGpkdnyP2S+5fEpM4gDDkf0nHnMHcLxIUwEQV0N0ih/litot3a1FY+5plmgNQ5irEK/6 X-Received: by 2002:a9d:3e43:: with SMTP id h3mr21849499otg.84.1580837150611; Tue, 04 Feb 2020 09:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580837150; cv=none; d=google.com; s=arc-20160816; b=OGrYLa37QB4v4CoE8ybwu16dinvxWRaxQgRROmEShsyWwWuW2Wn30yjfE4DhSYE8Dn Uf7WbGRmemNMW+pORgXm39NSOEba6kb5w3GKPdv1baM/rY8mxTr/0MQQiOU2fYQI0P21 l9YDg6n6VUX9UNIZzG3Vg5uQSVccgo1ekTpzx0jqYnwBpGYHIXsayHV8WkNjw+oRnZTo 4G19RmUU5TYzOJfzP1yfRVgIFI7OvMs++rWA2mi+xMtHv1CLmW5i+SEaRBezzYa/8FAO yXQCM4EY69fBySPgjMi1Zl9zIzNe/BYUhseOlVIwbjs9xk0P+LXyghEGQAmd5RNpVzOj bjsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=tcc466UZPNiMaRq2RAxfuRfXV1jQ8fxTqtkkTCEyZkA=; b=EoBvNPirsFMVLuamcRgJ9Rs5/NZUgaUY7vOoknfNaGFkOzPYsxgdaNR+6Lg5s2lsr1 BUQ4ip9Ibbo4AUak1YD6HMBcNm8AaldLMnshI3mkl7PA7wvjFTU5nzd8KDKQV4yYjRFY /hi1r2j/ZiDTlt5Kh6jEkGJsaqwmQM7WVRwXLRvj5Coyrkp1FnAVZt+EJaPm4Xzbydfz 5t5aVeT9pqJd2QF8QqRR0BicCvwM5Xe+0no/z088cht1EMZPvewU2P/mdQUOTiQmu115 O+LJrvtCKtm7d4qTnENVFCv4lANB71ZdHun8r0eqMFMROBLNpICYPnwC2GXeD57SHHAZ iXHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k184si10815549oib.239.2020.02.04.09.25.39; Tue, 04 Feb 2020 09:25:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbgBDRXT (ORCPT + 99 others); Tue, 4 Feb 2020 12:23:19 -0500 Received: from foss.arm.com ([217.140.110.172]:39110 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727382AbgBDRXT (ORCPT ); Tue, 4 Feb 2020 12:23:19 -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 B9F29101E; Tue, 4 Feb 2020 09:23:18 -0800 (PST) Received: from [192.168.0.7] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3AD373F68E; Tue, 4 Feb 2020 09:23:17 -0800 (PST) Subject: Re: [PATCH v2] sched: rt: Make RT capacity aware To: Qais Yousef , Steven Rostedt Cc: Pavan Kondeti , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Ben Segall , Mel Gorman , LKML References: <20191009104611.15363-1-qais.yousef@arm.com> <20200131100629.GC27398@codeaurora.org> <20200131153405.2ejp7fggqtg5dodx@e107158-lin.cambridge.arm.com> <20200203142712.a7yvlyo2y3le5cpn@e107158-lin> <20200203111451.0d1da58f@oasis.local.home> <20200203171745.alba7aswajhnsocj@e107158-lin> <20200203131203.20bf3fc3@oasis.local.home> <20200203190259.bnly7hfp3wfiteof@e107158-lin> From: Dietmar Eggemann Message-ID: Date: Tue, 4 Feb 2020 18:23:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200203190259.bnly7hfp3wfiteof@e107158-lin> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/2020 20:03, Qais Yousef wrote: > On 02/03/20 13:12, Steven Rostedt wrote: >> On Mon, 3 Feb 2020 17:17:46 +0000 >> Qais Yousef wrote: [...] > In the light of strictly adhering to priority based scheduling; yes this makes > sense. Though I still think the migration will produce worse performance, but > I can appreciate even if that was true it breaks the strict priority rule. > >> >> You can add to the logic that you do not take over an RT task that is >> pinned and can't move itself. Perhaps that may be the only change to > > I get this. > >> cpu_find(), is that it will only pick a big CPU if little CPUs are >> available if the big CPU doesn't have a pinned RT task on it. > > But not that. Do you mind rephrasing it? > > Or let me try first: > > 1. Search all priority levels for a fitting CPU Just so I get this right: All _lower_ prio levels than p->prio, right? > 2. If failed, return the first lowest mask found > 3. If it succeeds, remove any CPU that has a pinned task in it > 4. If the lowest_mask is empty, return (2). > 5. Else return the lowest_mask with the fitting CPU(s) Mapping this to the 5 FIFO tasks rt-tasks of Pavan's example (all p->prio=89 (dflt rt-app prio), dflt min_cap=1024 max_cap=1024) on a 4 big (Cpu Capacity=1024) 4 little (Cpu capacity < 1024) system: You search from idx 1 to 11 [p->prio=89 eq. idx (task_pri)=12] and since there are no lower prior RT tasks the lowest mask of idx=1 (CFS or Idle) for the 5th RT task is returned. But that means that CPU capacity trumps priority? [...]