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=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 6A01EC433DF for ; Mon, 19 Oct 2020 14:15:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1485D2177B for ; Mon, 19 Oct 2020 14:15:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729387AbgJSOPJ (ORCPT ); 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