Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp493599rdf; Fri, 3 Nov 2023 06:50:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJgy3IHO+QX1zcynbh0BcUMXbkwYwxp3vw84UCIj4GghHtf6YicQmGh/37H7FuxbMV8k8f X-Received: by 2002:a05:6870:1309:b0:1ea:7bd1:c495 with SMTP id 9-20020a056870130900b001ea7bd1c495mr20578355oab.27.1699019456714; Fri, 03 Nov 2023 06:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699019456; cv=none; d=google.com; s=arc-20160816; b=jfpR4L/5zExIO0+lZgeq2yxIOVr6VQ6yG/UgAnxqwejgMir9047YTmBwVejZTm4jLj VXVw7gLtl5PtXmYeG/5Uwcb06TrmLSVgKzEqhk4R/VeceYvhPVMgYRceVKg3Ow+/ztwi +LnBd4LOL3hm+74UwUe0MftzuFuqF/JDkzM6c2T87jB6l6dbbGbR9vS6sJUp/sXTUapg oRGg9WEh6g5LRc4S7E/MutsfLnjLfQD5DSjtpVs9V/y7d5+4lX2KHhaEAKe6A+hWZOkV I+jPu1dASU1Ps8KbwulPNIkx0KM2UEU+vtG3xLU0pwbUjrSlBvC9UltadwfaDhzeV4oa GgTw== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=CyRefRGLXKIyDbmCt9sAzPexc52vI6BkttLQafIR8JA=; fh=AfLL/DKK2gQQEoZBzmnH4pb//TwGt2KTQ6T6ssunXrA=; b=jc7KDf1nmOWO+Sdywc03qVkcmjLnhlZKP7H2NayGYjqOc3qLamnEfppGRGrgWuznEj w0QUgf8YZMDGihOomEyH1DvSa+YeLVtXzccV3KA6nBBDji867s0chR0zLNQl3dH0li5p DNAvTVA8vaPTNigqJYuCH/MFUrwd0ISt/aYPx4kBwnsaYAW3p3cwgzqHwUgzKsAJQKHf vc4pyThphhxHI8WP76dCfzeUKZF0RsO6PcybNLxSC+iyENb4q5kwT07e8tae6oo30jLZ zkq/752+IcLkjSQ4lbXeZo0rwpurks3RYKQ/6jL9NgrrC3Gt1H3YL7f7TgZp2z/A9bN2 su+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bz42-20020a056a02062a00b005b9a1494637si1629415pgb.317.2023.11.03.06.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 06:50:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3D5DF822CB0A; Fri, 3 Nov 2023 06:50:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233140AbjKCNuo (ORCPT + 99 others); Fri, 3 Nov 2023 09:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233045AbjKCNun (ORCPT ); Fri, 3 Nov 2023 09:50:43 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0D405D59 for ; Fri, 3 Nov 2023 06:50:39 -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 5AE6E2F4; Fri, 3 Nov 2023 06:51:22 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 133BF3F64C; Fri, 3 Nov 2023 06:50:37 -0700 (PDT) Message-ID: <66e62c6f-b585-47a7-a519-9a8feea7176c@arm.com> Date: Fri, 3 Nov 2023 14:50:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 5/6] sched/uclamp: Remove all uclamp bucket logic Content-Language: en-US To: Hongyan Xia , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Juri Lelli Cc: Qais Yousef , Morten Rasmussen , Lukasz Luba , Christian Loehle , linux-kernel@vger.kernel.org References: <48fcea0a9bb2d2212c575032e64ab717756dc0fa.1696345700.git.Hongyan.Xia2@arm.com> From: Dietmar Eggemann In-Reply-To: <48fcea0a9bb2d2212c575032e64ab717756dc0fa.1696345700.git.Hongyan.Xia2@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 06:50:54 -0700 (PDT) On 04/10/2023 11:04, Hongyan Xia wrote: > From: Hongyan Xia > > Also rewrite uclamp_update_active() so that the effective uclamp values > are updated every time we change task group properties, change system > defaults or a request is issued from userspace. Tested it with # cgcreate -g cpu:/A # echo $$ > /sys/fs/cgroup/cpu/A/tasks (1) per-task # uclampset --pid $$ -m 256 -M 768 (2) per taskgroup # echo 25.0 > /sys/fs/cgroup/cpu/A/cpu.uclamp.min # echo 75.0 > /sys/fs/cgroup/cpu/A/cpu.uclamp.max (3) system-wide # echo 256 > /proc/sys/kernel/sched_util_clamp_min # echo 768 > /proc/sys/kernel/sched_util_clamp_max uclamp_update_active() -> uclamp_update_active_nolock() is called in all cases. [...] uclamp_eff_get()'s function header still mentions `clamp bucket index`. > @@ -1542,196 +1485,24 @@ uclamp_eff_get(struct task_struct *p, enum uclamp_id clamp_id) > > unsigned long uclamp_eff_value(struct task_struct *p, enum uclamp_id clamp_id) > { > - struct uclamp_se uc_eff; > - > - /* Task currently refcounted: use back-annotated (effective) value */ > - if (p->uclamp[clamp_id].active) > - return (unsigned long)p->uclamp[clamp_id].value; > - > - uc_eff = uclamp_eff_get(p, clamp_id); > - > - return (unsigned long)uc_eff.value; > -} [...]