Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp304154rwe; Tue, 18 Apr 2023 22:28:47 -0700 (PDT) X-Google-Smtp-Source: AKy350bNp6JQ8t5Rq1Osy1wgMlhXA7DmsBbjMKaku+7JGjbzrFTv011usMfKs7kbkcnvYK0OfNQ8 X-Received: by 2002:a05:6870:b394:b0:183:f912:8488 with SMTP id w20-20020a056870b39400b00183f9128488mr744806oap.7.1681882127231; Tue, 18 Apr 2023 22:28:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681882127; cv=none; d=google.com; s=arc-20160816; b=quSwdZYChCYJQ2k9cM0+9TQnp3q7qv6vOcOyp5VTYuIXbKNIqFK9TcBidpKIckCWjY PmTpD4spJjFZNrgN41g3zE9CZVDXVi0DqL2pQs7bMsTDGFGwRHBEPTTi9gv0IumOrD9R LWBGeZx9cn03faa/+tcEMa7qfDeiL/vMoRAJGrd1vov0Gx6B/8KAC/zkrSn9o4oC5uoz 3XPHNPeMXNlfxWfhYc7ShiTgJ4shpT4CGzr6gG6cZHjJb4iehfgivzYADuoYcVti8mfO h5xxQwUMU/JlAVUAfBxVC1KcVXfAH0WzLCA7ygPFAgBMd0l4cshJCVDAa1a8LX8N23Lt L41g== 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=dLsIzYKaGeeFi1MUXlUpZvzj1u0T75L02jx4yzjCCkA=; b=tLGuuIsJWw2/z0Et+4Izht7DHyjxVR8q30iYcnWno9XYxLb1jjuNw/gGsELh7u4CZJ N5SQJE8whFN8OgTHvjeFfgzfLnqp6MkxXJo/c6HPAiRLWJmobef4vHP6OoJPNMI40bGq 8wGCDOEcBfOSHTqacPg6nlrdBxvYlp7u5vCLmsov70xgj/Mnn0A4hHvi3LYT0xdag+RC dQGWdKei9ts4y550Oel5PuBb49T9bPe/I2y9UEINzfMR2rijjhkgg3KU6BVzjgr+ZAP9 tLHSbNZWIv8DjYiiDFxzUUYcgh5vBBoyFZHt85z/e4lnQJ1e7buO02jBY7r0Tr5y+MQE z5jQ== 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 s4-20020a056870ea8400b0017ada6bad83si14343178oap.20.2023.04.18.22.28.33; Tue, 18 Apr 2023 22:28:47 -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 S231444AbjDSFTB (ORCPT + 99 others); Wed, 19 Apr 2023 01:19:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230435AbjDSFS6 (ORCPT ); Wed, 19 Apr 2023 01:18:58 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2399E469F for ; Tue, 18 Apr 2023 22:18:56 -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 1CEFD143D; Tue, 18 Apr 2023 22:19:40 -0700 (PDT) Received: from [192.168.189.178] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1EEA03F587; Tue, 18 Apr 2023 22:18:52 -0700 (PDT) Message-ID: Date: Wed, 19 Apr 2023 07:18:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [RFC PATCH v1] sched/uclamp: Introduce SCHED_FLAG_RESET_UCLAMP_ON_FORK flag Content-Language: en-US To: David Dai , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider Cc: Qais Yousef , Quentin Perret , Saravana Kannan , kernel-team@android.com, linux-kernel@vger.kernel.org References: <20230416213406.2966521-1-davidai@google.com> From: Dietmar Eggemann In-Reply-To: <20230416213406.2966521-1-davidai@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.8 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 On 16/04/2023 23:34, David Dai wrote: > A userspace service may manage uclamp dynamically for individual tasks and > a child task will unintentionally inherit a pesudo-random uclamp setting. > This could result in the child task being stuck with a static uclamp value Could you explain this with a little bit more detail? Why isn't the child task also managed by the userspace service? The child task will only make a difference if it's on the rq. Does this issue happen with uclamp mainline or only with Android's slightly different version (max- vs. sum aggregation)? > that results in poor performance or poor power. > > Using SCHED_FLAG_RESET_ON_FORK is too coarse for this usecase and will > reset other useful scheduler attributes. Adding a > SCHED_FLAG_RESET_UCLAMP_ON_FORK will allow userspace to have finer control > over scheduler attributes of child processes. [...]