From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 012511B3927 for ; Mon, 10 Mar 2025 15:37:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741621062; cv=none; b=GZW7AhDXE7qO6tDyS/esktB9O/NjMoC11vnNRA5B3z5ZPtSN5hqy2tQeA7lXUGHp0s/UMaHmTFGz0o/zqoNPgpDcqDg3maW9EReSG847Z7AJSNfxoRmQsPYQBWtzmSJwPg0fNTPLF4C+YyePWEFfl09tqxOUsJgOaVilP8mEA6I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741621062; c=relaxed/simple; bh=DcaynPSTfCFPu46URPqTnbfY89OV/2dhTpGCXPyuXJM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=V8zbyvgdtIFDBL2GWj/5ApaD/eucEXdVWSUI4aD8EFtYJZVkFzTEqxQcRRLHp/WIy+mkWBQ+e8pywZtgt2XTfdwnGEHxnv2ez21+wCagZOFWbEu31AUU7CCu3M/uubPMZ3Di3j3k5QaQDq+VCe6t5J3M5dxatwQyFK/VYIiOt0I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 A62E51692; Mon, 10 Mar 2025 08:37:51 -0700 (PDT) Received: from [192.168.178.6] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9ABD53F5A1; Mon, 10 Mar 2025 08:37:38 -0700 (PDT) Message-ID: Date: Mon, 10 Mar 2025 16:37:37 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/8] uclamp sum aggregation To: Hongyan Xia , Xuewen Yan Cc: Ingo Molnar , Peter Zijlstra , Vincent Guittot , Morten Rasmussen , Lukasz Luba , Christian Loehle , Pierre Gondois , linux-kernel@vger.kernel.org, Xuewen Yan References: <6eb93af8-e239-44d7-a132-2932f260e792@arm.com> <13ea9f62-e373-4248-997c-47c15e024c02@arm.com> <4a8ed999-2ee5-478c-a759-fec1c496cba9@arm.com> From: Dietmar Eggemann Content-Language: en-US In-Reply-To: <4a8ed999-2ee5-478c-a759-fec1c496cba9@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 10/03/2025 13:54, Hongyan Xia wrote: > On 10/03/2025 11:34, Dietmar Eggemann wrote: >> On 06/03/2025 12:38, Xuewen Yan wrote: >>> On Thu, Mar 6, 2025 at 7:32 PM Hongyan Xia wrote: >>>> >>>> Hi Xuewen, >>>> >>>> On 06/03/2025 11:12, Xuewen Yan wrote: >>>>> Hi Hongyan, >>>>> >>>>> On Tue, Mar 4, 2025 at 10:26 PM Hongyan Xia [...] >> Like I mentioned already in the original thread: >> >> https://lkml.kernel.org/r/65365ec7-6a16-4e66-8005-e78788cbedfa@arm.com >> >> I would prefer that uclamp stays in core.c. ENQUEUE_DELAYED among all >> the other flags is already used there (ttwu_runnable()). >> >> task_struct contains sched_{,rt_,dl_}entity}. We just have to be >> careful when switching policies. >> >> -- >> >> Could you also incorporate the changes in {en,de}queue_task_fair() >> ((task_on_rq_migrating(p) || (flags & {RESTORE,DEQUEUE}_SAVE))) vs. >> (!p->se.sched_delayed || (flags & ENQUEUE_DELAYED)) and >> (!p->se.sched_delayed) so the uclamp-util_est relation is easier to spot? >> >> [...] > > At the moment we can't do this. Sum aggregation was designed before > delayed dequeue and it syncs with p->se.on_rq. If we sync with something > else and take care of delayed dequeue cases (like util_est) then I have > to rewrite part of the series. Ah, OK! But this 'uclamp not in sync with util_est' is already an issue on today's mainline so I would like to see this fixed as discreet as possible and then another prep-patch for 'uclamp sum aggregation'. IMHO, then it's clearer why we would need more rework in this area.