From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6ABFC360 for ; Mon, 6 Jan 2025 18:53:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736189602; cv=none; b=YAkmcjfF5YdZSjPyZeb4guM9a2gQQxLqUebbpGP6sfTJXuAp6cUBxdcpxNB45FWOzjsllI8tkKgXH09z+/ZTMJI/Vd4DsMXnka9/AEFjNhtl2in7/HRvIH56jIq68oO8TyRXeQe2NDG2dXG1qfbuouCBI94Qlbp7bJbLyLCL4sI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736189602; c=relaxed/simple; bh=+kgplTFhDtd5yMs3IoFAZ1TNsBu/UL1Jv2lT29yIS90=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ceddpzvoGbu5bh95MTedyZx9yRm0sPosGKdCunpWnYDvPdTk/enTYGAxRD9uYnQcwW2mYfZxfoB4gKcQ05iIiY57XF30iRefDIt/t4SLnBS4r6EhA/TH9eYRn/NumbI5W/SYnW9gJ+ubaNHA7r2YC5nDUsvRpx5X3yda/yxjt9c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fUclwJcF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fUclwJcF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD802C4CED2; Mon, 6 Jan 2025 18:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736189601; bh=+kgplTFhDtd5yMs3IoFAZ1TNsBu/UL1Jv2lT29yIS90=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fUclwJcF18Ybn5csJ4V3eLk45g0czsr7R1if2IFDOxUD+9seK34MBVyIeJ6Cu9tnw 7IwPuGxu1EQHWYcFqhj8e6wa4NOGGXfhLA6om1kLKqwbk1KlRvIBriH6hG8NXswZ9w QjOyFIFAGqI5sEJ8zm+XEMOOrgw68kVCj0N5wOpvYESHTgmKZOsdue/Es3Tp/fWLmi sueBb3fUo9b6Zg0XLCvFkJfu6spQHtF9yaD6k7eO4CAdF9bl51Oq5cOf8MRn9++PWa lzHsFINIfcM2Cwg5po/FEmJDtKbz+BrtrHmWwCytY2sUq97bm00DfnUBoO0aU3Jo4c 9rf18khDQFDug== Date: Mon, 6 Jan 2025 08:53:20 -1000 From: Tejun Heo To: Andrea Righi Cc: David Vernet , Changwoo Min , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched_ext: Refresh idle state when kicking CPUs Message-ID: References: <20250101182449.21517-1-arighi@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hello, On Sat, Jan 04, 2025 at 08:06:26AM +0100, Andrea Righi wrote: ... > The issue is that we call ops.update_idle() when a CPU enters or exits > SCHED_IDLE, whereas it should ideally be called when the CPU transitions > in/out of the idle state. So perhaps a kick from idle should trigger > ops.update_idle(cpu, false)? Still, I'm not sure if that would provide any > benefit... after all, do you see any practical scenarios where having > unbalanced transitions could be a problem? If possible, we should keep the calls balanced even if that means a bit of complications on the core side as these things can become subtle bugs from BPF scheduler side. And, yeah, I think kicking transitioning the CPU out of idle makes sense to me. Thanks. -- tejun