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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 567CFC11F65 for ; Wed, 30 Jun 2021 11:31:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 382A061419 for ; Wed, 30 Jun 2021 11:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234385AbhF3Le0 (ORCPT ); Wed, 30 Jun 2021 07:34:26 -0400 Received: from foss.arm.com ([217.140.110.172]:35878 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234319AbhF3LeX (ORCPT ); Wed, 30 Jun 2021 07:34:23 -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 E0A8BD6E; Wed, 30 Jun 2021 04:31:54 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ED73A3F5A1; Wed, 30 Jun 2021 04:31:51 -0700 (PDT) From: Valentin Schneider To: Xuewen Yan Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Benjamin Segall , Mel Gorman , Daniel Bristot de Oliveira , linux-kernel , Patrick Bellasi , Chunyan Zhang , Quentin Perret , Qais Yousef Subject: Re: [PATCH] sched/uclamp: Fix getting unreasonable ucalmp_max when rq is idle In-Reply-To: References: <20210618072349.503-1-xuewen.yan94@gmail.com> <87fsx093vm.mognet@arm.com> Date: Wed, 30 Jun 2021 12:31:45 +0100 Message-ID: <87czs38u72.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/06/21 09:24, Xuewen Yan wrote: > On Tue, Jun 29, 2021 at 9:50 PM Valentin Schneider > wrote: >> + min_util = max_t(unsigned long, min_util, READ_ONCE(rq->uclamp[UCLAMP_MIN].value)); >> + max_util = max_t(unsigned long, max_util, READ_ONCE(rq->uclamp[UCLAMP_MAX].value)); > > Is it necessary to use max_t here? although it is not the main problem... > I got comparison warnings when using a regular max() - the RQ clamp values are unsigned int, whereas the local variable is unsigned long. >> +out: >> /* >> * Since CPU's {min,max}_util clamps are MAX aggregated considering >> * RUNNABLE tasks with _different_ clamps, we can end up with an > > Thanks! > xuewen