Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp617003rwd; Wed, 7 Jun 2023 04:54:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58aSCxwBWnK/P5v67Nv1fSl+EIMv8aNpY4p6X+jVJdEC5n/PX6dzAW60qqj23YNmyaDi2P X-Received: by 2002:a05:6a20:258b:b0:10b:cf0a:f82a with SMTP id k11-20020a056a20258b00b0010bcf0af82amr3195110pzd.45.1686138860847; Wed, 07 Jun 2023 04:54:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686138860; cv=none; d=google.com; s=arc-20160816; b=0mUmbm2Fkvo97D8saG8HctL4sEBPoxDUhfE6/+Eld2TzcNAdQARzsPm9M+nrS8bLqz VxZYaDxAEDUuyP/s7pbHtXk87+wU1ximUWza/U0nGDMNYtlYmwwJFKbrQtnicE9x0+XS u/HIjdoid2ozZCgbKdrN3AhVERtKUCa6ubdtH1hGav0aKz7rTPK4IR7gbrmWon719hax QSilXpYPxvRxsZYb13GR1yiIEagKE79M/yc8d/HiDvoo5AYj81JjhjrUhgp9BJEVFZIZ eoPYGlPa6Ibs9UIGj7kY0h6h5gdua3c1yWqNw1Dj8+kaXoFEBP+iYNMJtSZkAuX3bGqQ FToA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=UvxwHVgJw3CwEMzKM9+5KE3yo7UdLoVob/4WU6iSSDk=; b=sSKsgA8un+ZFxupZCFpaQ/XStAHzJD12ZzaN4LbwgO1WM27pLhGJFSDWvZTSTxhfr1 f4lzSngbxC6A9KK+Hb9cjpLdtqXDbYa0xAHTp+hPFMilgvDmoQUwDkoLAjdxDJlb4eEk hA95RVL79HxaIBNz+5xs5Vsy4Tel+Wl93ti1sXwZVDkrd9YhQ6vMJqLOnKJ9o+azZNrp 5J13aae6QAs8JMYnl1bU56ciYzI2QqHJznjA2k6jGDyFlQdq4ovoMAfUlR/xHJJ+/C53 Kt2ES57W8QanqR6510XaqLaWGlizrmqvUqRtkAc6UtuiLthrnwpdN6uKaEY9J8Jfn8zn cF3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a639354000000b0053f24d5aaadsi8971653pgm.121.2023.06.07.04.54.05; Wed, 07 Jun 2023 04:54:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239767AbjFGLuQ (ORCPT + 99 others); Wed, 7 Jun 2023 07:50:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239617AbjFGLuM (ORCPT ); Wed, 7 Jun 2023 07:50:12 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4F3761BE5 for ; Wed, 7 Jun 2023 04:50:11 -0700 (PDT) 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 6BF26AB6; Wed, 7 Jun 2023 04:50:56 -0700 (PDT) Received: from [10.57.24.86] (unknown [10.57.24.86]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8E31A3F6C4; Wed, 7 Jun 2023 04:50:09 -0700 (PDT) Message-ID: <2a9ed73a-256c-4ace-6b26-e30ac69cbdbc@arm.com> Date: Wed, 7 Jun 2023 12:50:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v2 1/3] sched/uclamp: Set max_spare_cap_cpu even if max_spare_cap is 0 To: Qais Yousef Cc: Ingo Molnar , Peter Zijlstra , Dietmar Eggemann , linux-kernel@vger.kernel.org, Lukasz Luba , Wei Wang , Xuewen Yan , Hank , Jonathan JMChen , Vincent Guittot References: <20230205224318.2035646-1-qyousef@layalina.io> <20230205224318.2035646-2-qyousef@layalina.io> <20230211172829.f2igueizqpwijjjz@airbuntu> Content-Language: en-US From: Hongyan Xia In-Reply-To: <20230211172829.f2igueizqpwijjjz@airbuntu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Qais, On 2023-02-11 17:28, Qais Yousef wrote: > On 02/07/23 10:45, Vincent Guittot wrote: >> [...] > > Isn't it better to go back to v1 form then? The inconsistent type paired with > the cast isn't getting too ugly for me :( > > I don't think we can convert cpu_cap to long without having to do more work as > it is used with 'util'. Sorry if I'm missing something obvious, but why can't we convert util to long? The only place I see which mixes with util is lsub_positive(&cpu_cap, util); but at this point both cpu_cap and util should have sane values (top bit not set) so doing clamped subtraction should just work fine? Hongyan