From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from va-1-113.ptr.blmpb.com (va-1-113.ptr.blmpb.com [209.127.230.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A58CC258CD9 for ; Mon, 1 Jun 2026 03:52:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.230.113 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780285963; cv=none; b=e8sujzBqpsfeLRpiVAX9ozOi1FBCLwWBMYmEriqbH87jadSRg7Yev1VZT+tdKo4YJSlQakCUTUK2yvrm0h9WpjP6A5PyuHwGn9c09O0hxKzzW1pflOot/W9/juhXMB+C+2MiIIFmM0/dwUwTynz+S1vsjTKVHc7zyuwjkdMmG2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780285963; c=relaxed/simple; bh=CiUYzmPoGYAmkXdX49tr25cASNBc/G4bO1p0Kw7qr/o=; h=From:References:Content-Disposition:In-Reply-To:To:Cc: Content-Type:Subject:Date:Message-Id:Mime-Version; b=GkSxjntw3HGJTJ+mCONDP/X/ghRR+lzf5OX8ERwKWOEcX5iWIq8vweGYAc/genKQCEBoAYcHfxMq1eKxiHOEyvPRuUT773YoN+lPYZF1ZVZ5GTiRfMIrzMEsKWC/b2LjJnJIvbFIiQsV95uxCycX/Z9XT+broe0LjeW/Dme4uo8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=Gn9+it4T; arc=none smtp.client-ip=209.127.230.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="Gn9+it4T" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1780285955; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=LxwMyQ6RC6cYzZxbxcOsq5AMIzA+rR9YLmtGiMhZxJw=; b=Gn9+it4TvgCRckZxzhgi0HAZeSvMLoEfDdbH5aDjf0gAQAYPCuUbC3lVGkMcgN97FdNA7v /sjdtT22Dyiefkt2xuh3I4KA7bjK9FsDY9OhWBhk/111TIheAihnC3alDWCpy+uvvCJrT7 vWsvnglwrviTQYobbAtiONlhwB2zpUy38ofVDdxk/vx8CxjInCXvBq5YejxHT7F2PZW3cb 8000wRlBWSPBJy9COHSgTASKvAoC378znt8jHdrTNG1OjK/6IBbD81sJiTfxY6i5WPOG/L ZYL+/dAzIYjD/XoYOfRycxvL4eeqojZTC+lLa6xmHGPYdl60y3QOf1LDxgeZ/w== From: "Aaron Lu" References: <20260528094830.13291-1-kprateek.nayak@amd.com> <20260528094830.13291-4-kprateek.nayak@amd.com> Content-Disposition: inline In-Reply-To: <20260528094830.13291-4-kprateek.nayak@amd.com> X-Original-From: Aaron Lu To: "K Prateek Nayak" Cc: "Ingo Molnar" , "Peter Zijlstra" , "Juri Lelli" , "Vincent Guittot" , "Dietmar Eggemann" , "Steven Rostedt" , "Ben Segall" , "Mel Gorman" , "Valentin Schneider" , "Josh Don" , Content-Type: text/plain; charset=UTF-8 X-Lms-Return-Path: Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 3/5] sched/fair: Call update_curr() before unthrottling the hierarchy Date: Mon, 1 Jun 2026 11:52:01 +0800 Message-Id: <20260601035201.GA690044@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Hi Prateek, On Thu, May 28, 2026 at 09:48:28AM +0000, K Prateek Nayak wrote: > Subsequent commits will allow update_curr() to throttle the hierarchy > when the runtime accounting exceeds allocated quota. Call update_curr() > before the unthrottle event, and in tg_unthrottle_up() to catch up on > any remaining runtime and stabilize the "runtime_remaining" and > "throttle_count" for that cfs_rq. > > Doing an update_curr() early ensures the cfs_rq is not throttled right > back up again when the unthrottle is in progress. > > Since all callers of unthrottle_cfs_rq(), except one, already update the > rq_clock and call rq_clock_start_loop_update(), move the > update_rq_clock() in unthrottle_cfs_rq() to the lonely caller that > doesn't update the rq_clock. Looks like there is one more path that doesn't have clock updated: cpu_max_write() -> tg_set_bandwidth() -> tg_set_cfs_bandwidth() -> unthrottle_cfs_rq().