From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5355C35247 for ; Tue, 4 Feb 2020 17:23:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 73F2E2082E for ; Tue, 4 Feb 2020 17:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727538AbgBDRXT (ORCPT ); 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? [...]