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 C80E91CBE98 for ; Tue, 1 Oct 2024 20:12:54 +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=1727813574; cv=none; b=SCZtrqO50wwtK5muFRM3PnQo+BhtX+zrhVCyUdq5w9oJlAE9fI+xFCPkUcv4kBsF7qOqvxKJXaInOxGDkE0gi/vtdZ1y7F2wa4h8enWKrrHLpUyfCAOwRExYkMpKXKwyimyLQHrqZKMZt9L1ssqPrw58bkS0dIluAWFbHBW3qNY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727813574; c=relaxed/simple; bh=hIJrYUl5c9+enmYoIqnxqVIIG83JWK8OjDTxsjhC3pI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UxytzrqHMiYQT+zz9nWqpx7En4nhTemLCDWC855r+a68zDSYVhokq5dRYxdMLUmRzUvdFfZCGO0Pd91e0IUq5/dlr3KXUk7LTi6e5HpgpZR3De/yZJ22/tP2xdd4jNR1fMMaBpBS2/VA+RWd05sEbPiVFJxR+rSoA5NDFrzTNqE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LLOQCiP/; 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="LLOQCiP/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19DBBC4CEC6; Tue, 1 Oct 2024 20:12:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727813574; bh=hIJrYUl5c9+enmYoIqnxqVIIG83JWK8OjDTxsjhC3pI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LLOQCiP/vqrNfvzlXvHtDhN/eYd89j++oAxEYfTuu+6Uas+DJvzbblaPwAb3s5Jzc 6yt/mToG1pkeoc1GQp1uFYW3iutwqQzB9/mzx4bk88nbnTAjOxZKDBgWWJ30pQCnWf Mp0WIy93bnldxlWXqo2WWy6vvPO3vs0c2URGn9KvrL7/r6Lbh0BG27ZORhcx/1LSN7 TTOssGgepyYaWRgZ02TExKXVLqY3MuFjtUxYDWpHBCl3nQkKiYLZKcD488wTMieIi4 dAJsOBc0tpMIyfvC8Y2731onWg3HnEc7HOVAJj3cMiBvCYLf2c3YdLlQAR5jAF6UFH +WTf2OvgEm3hg== Date: Tue, 1 Oct 2024 10:12:53 -1000 From: Tejun Heo To: void@manifault.com, peterz@infradead.org, mingo@redhat.com Cc: kernel-team@meta.com, linux-kernel@vger.kernel.org, sched-ext@meta.com Subject: Re: [PATCH 2/3] sched/core: Add ENQUEUE_RQ_SELECTED to indicate whether ->select_task_rq() was called Message-ID: References: <20240927234838.152112-1-tj@kernel.org> <20240927234838.152112-3-tj@kernel.org> 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: <20240927234838.152112-3-tj@kernel.org> On Fri, Sep 27, 2024 at 01:46:12PM -1000, Tejun Heo wrote: > During ttwu, ->select_task_rq() can be skipped if only one CPU is allowed or > migration is disabled. sched_ext schedulers may perform operations such as > direct dispatch from ->select_task_rq() path and it is useful for them to > know whether ->select_task_rq() was skipped in the ->enqueue_task() path. > > Currently, sched_ext schedulers are using ENQUEUE_WAKEUP for this purpose > and end up assuming incorrectly that ->select_task_rq() was called for tasks > that are bound to a single CPU or migration disabled. > > Make select_task_rq() indicate whether ->select_task_rq() was called by > setting WF_RQ_SELECTED in *wake_flags and make ttwu_do_activate() map that > to ENQUEUE_RQ_SELECTED for ->enqueue_task(). > > This will be used by sched_ext to fix ->select_task_rq() skip detection. Peter, ping on patches 1-2. If they look okay, I can route them through sched_ext/for-6.12-fixes. Thanks. -- tejun