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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D80F2C07545 for ; Wed, 25 Oct 2023 14:04:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344831AbjJYOEl (ORCPT ); Wed, 25 Oct 2023 10:04:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235071AbjJYOEh (ORCPT ); Wed, 25 Oct 2023 10:04:37 -0400 Received: from smtpout.efficios.com (unknown [IPv6:2607:5300:203:b2ee::31e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C20D918A for ; Wed, 25 Oct 2023 07:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1698242671; bh=BETV4KNiAreEsHtti0xML6K5ApKQpOTbKlT/YsBc0xI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SmBKWMxzorv+YQ5OGvpMGhELk2uO66JUCmEDEvuLQAbMBGVaP/m1oWxE1oekRmOnu GGVWOlkrSVmPm41hbiMQv2UeUsJZzjCRUAdsn2Ex3eYPP7+v5cmZh9ecMurpdJZODO M4aSXUX4ScurEl8tl3Nv6x5Wly6W6/FnbOaDFAQzXAG7ll+Mdp8RZDG2oTdK/9CBH6 axMbsY5sqlgA79BsneJ5yGDqENVn2dBjKHgyCVHjMmlSj9j2X9MlJhRTGBseUVt7ll jBnUehbz4/Rq6u2pyjajBHdtiZKHP87zo6K41dYWODa6IQyoFV5P0ZD2I8QN2vfbHI zmetcTSCyXKjw== Received: from [172.16.0.134] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4SFrJv3Jhdz1YyP; Wed, 25 Oct 2023 10:04:31 -0400 (EDT) Message-ID: <57b3b129-9d89-4008-b160-b77116c4e8e0@efficios.com> Date: Wed, 25 Oct 2023 10:04:46 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v2 1/2] sched/fair: Introduce UTIL_FITS_CAPACITY feature (v2) Content-Language: en-US To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Valentin Schneider , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Vincent Guittot , Juri Lelli , Swapnil Sapkal , Aaron Lu , Chen Yu , Tim Chen , K Prateek Nayak , "Gautham R . Shenoy" , x86@kernel.org References: <20231019160523.1582101-1-mathieu.desnoyers@efficios.com> <20231019160523.1582101-2-mathieu.desnoyers@efficios.com> <20231025075646.GB37471@noisy.programming.kicks-ass.net> From: Mathieu Desnoyers In-Reply-To: <20231025075646.GB37471@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-10-25 03:56, Peter Zijlstra wrote: > On Thu, Oct 19, 2023 at 12:05:22PM -0400, Mathieu Desnoyers wrote: > >> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h >> index e93e006a942b..463e75084aed 100644 >> --- a/kernel/sched/sched.h >> +++ b/kernel/sched/sched.h >> @@ -2090,6 +2090,11 @@ static const_debug __maybe_unused unsigned int sysctl_sched_features = >> >> #endif /* SCHED_DEBUG */ >> >> +static __always_inline bool sched_util_fits_capacity_active(void) >> +{ >> + return sched_feat(UTIL_EST) && sched_feat(UTIL_FITS_CAPACITY); >> +} > > This generates pretty terrible code; it cannot collapse this into a > single branch. And since sched_feat is at best a debug interface for > people who knows wtf they're doing, just make this UTIL_FITS_CAPACITY > with a comment or so. OK, change applied for the next round, thanks! Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com