Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3232224pxu; Mon, 19 Oct 2020 07:17:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUXg3e8SJXt+/3fpRK4B85NVhuLkMAl5yt+ybFqAdh9JzaFg9HoVIZuEDF1TNRAjeyEYLu X-Received: by 2002:a05:6402:22ae:: with SMTP id cx14mr18505123edb.73.1603117059350; Mon, 19 Oct 2020 07:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603117059; cv=none; d=google.com; s=arc-20160816; b=vVouKyn2PNaahDJHO/epszNEKJXiyzg8+TOxtSq9dy1SjJ8397hBN3x5lrYFlGsQ0/ LUEze5BUEJhFlOFiKRlnH0K4YbWdlwB60z0AEgXJ9pyDsgV4Xd6JeH04BUVESopkCLg0 5WnCqI5Plfb21Lcmw+IgUo8+doAXxmltMohcYgBXkL9ES2Sw3FpzGIchG0u+MHPLjeE1 ogyFWoZebJrOEiKR4NJbli9YlEWQX8l8R1GgNd4WzmnS52Hzzwwvx4CBmDBvuLjdTliE TxO8+se9Lvaos9KbO2d5YzW/9uWlU6Iytyrvs09ZpZb8vOC6Seiv/UOmbAdwDiofMi+u aXVg== 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=sSfksPKJRid+LC2UgjrDzQJKbypaND5hv8J6KA7JA5Q=; b=PAkzKx/R7Wz/bpsUK+Hw65eTKIDjRntNDMQ2JY0Ed4rnwACnQHBaOEKIzh0caVgGtJ NGopgoVznh3hezCUuDPbfreW2PBBYv3uh8KpqFGNEvExxdr2EoDrdKFlDChQ5y1TO0ec IGf6urdU19U9KW6CKopVf1pzvzvv8d0B9f8qlIRRUuUFNIKX3JXmUFeVeYYbv9LmXfgQ Twjr6jvGZKrWjIkC3Et3lakcZufNkrXEpj22irgK1r5Ir8mIdNGNH1MdGX6SNPpWjhnd dVnu15NVV65T2ezm2LvvxOHGAHmr7c3hP307p5u8JzJJd4+25oJ0sVBryFNuBKNkJRbu QT+g== 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 v22si8103535eds.304.2020.10.19.07.17.17; Mon, 19 Oct 2020 07:17:39 -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 S1729326AbgJSOPJ (ORCPT + 99 others); Mon, 19 Oct 2020 10:15:09 -0400 Received: from foss.arm.com ([217.140.110.172]:58738 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728344AbgJSOPI (ORCPT ); Mon, 19 Oct 2020 10:15:08 -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 218D1D6E; Mon, 19 Oct 2020 07:15:08 -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 725683F66E; Mon, 19 Oct 2020 07:15:06 -0700 (PDT) Subject: Re: [PATCH 4/2] sched/cpupri: Add CPUPRI_HIGHER To: Peter Zijlstra Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org References: <20200922083934.19275-1-dietmar.eggemann@arm.com> <20201014195437.GD2974@worktop.programming.kicks-ass.net> From: Dietmar Eggemann Message-ID: <17c8a9b5-b63a-1a1a-f11b-5e00c2a6ad34@arm.com> Date: Mon, 19 Oct 2020 16:15:01 +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: <20201014195437.GD2974@worktop.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 14/10/2020 21:54, Peter Zijlstra wrote: > > Add CPUPRI_HIGHER above the RT99 priority to denote the CPU is in use > by higher priority tasks (specifically deadline). sugov:X already triggers this now on our !fast-switching devices running schedutil. > XXX: we should probably drive PUSH-PULL from cpupri, that would > automagically result in an RT-PUSH when DL sets cpupri to CPUPRI_HIGHER. > > Signed-off-by: Peter Zijlstra (Intel) [...] > @@ -54,6 +56,10 @@ static int convert_prio(int prio) The BUG_ON could be tightened: - BUG_ON(prio >= MAX_PRIO); + BUG_ON(prio > MAX_RT_PRIO); > case MAX_RT_PRIO-1: > cpupri = CPUPRI_NORMAL; /* 0 */ > break; > + > + case MAX_RT_PRIO: > + cpupri = CPUPRI_HIGHER; /* 100 */ > + break; > } > > return cpupri; Just saw that the comment for cpupri_set() needs changing: @@ -205,7 +208,7 @@ int cpupri_find_fitness(struct cpupri *cp, struct task_struct *p, * cpupri_set - update the CPU priority setting * @cp: The cpupri context * @cpu: The target CPU - * @newpri: The priority (INVALID-RT99) to assign to this CPU + * @newpri: The priority (INVALID-RT1-RT99-NORMAL-HIGHER) to assign to this CPU Reviewed-by: Dietmar Eggemann