From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 98C3B3E3156 for ; Thu, 25 Jun 2026 12:41:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782391297; cv=none; b=Q0xqPnDkCLNXdoJyFpEjD+tp8liruKuJWGyxlW0yt21AB/LurWo61/QreDw8NSq8t5ejsMNwB6Vqd+vY8G1gNNFXyk6KES0ehXtn/5MgAbMM10WuDcAghW8khXJSYGmXG94st/QVRJGMMtYXQUdC6DQ9Yz6wHm9bz6lnGb3+org= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782391297; c=relaxed/simple; bh=/eBEgNEkNjfq9iOqtayWFgtB5gZ+YRCsyxmTIR84Fw8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B68EP6fbewX4M78Mg+OeWiVEeft/9pOpEM1DjYg2+yazt2mUhzT9iSPuOSf0FWEmVB4aUIKaljjIiThZVVO0iwuFbsgTncGU564YCLBgESSaa6h/IxtaSPA7M2KkoXDnvkULxzkSLWJrwwdF1/vHYOn6bsymePmqgSBGSXkB0Iw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=ThTdcrZs; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ThTdcrZs" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YyBtgwYaH3jr14cR1u1HXFf0t5495FZE9iTnMDwOei4=; b=ThTdcrZsWRBqumO8Dk0+EwHAdZ pfWwRyEzWoO8CcgIpKiKjRYGMi2izkaQaSQqT+GA+4RT0HTt62FsywFww3AlT6BcQ1yqLNXF+NMIa SuOqtzUT9q8WAdql7/L/0Id0SjuTB1yZXArVKxW5ckYauZKmP3/7GBr3h3DFM03IJ88CVJa+aBawi Ec6FxgN0Bji9GCI232bklr/XcRiCEoLpkhW2bpEeqflzVpJBBw6xKLlKjjUlWgKdio+Xia4s0pes6 j56YAEpq86leo++qN1h8a17QHVzNXQOe0wEbeAhWKVZYJVhQgMq0U59OV8V8nsAawr6R035x2BKgS O137z/lg==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.99.2 #2 (Red Hat Linux)) id 1wcjOT-00000003cU1-2xF8; Thu, 25 Jun 2026 12:41:22 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id CC0403014C0; Thu, 25 Jun 2026 14:41:19 +0200 (CEST) Date: Thu, 25 Jun 2026 14:41:19 +0200 From: Peter Zijlstra To: K Prateek Nayak Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, ziqianlu@bytedance.com, tj@kernel.org, williams@redhat.com, jkacur@redhat.com Subject: Re: [PATCH 1/2] sched/core: Allow newidle for core-sched Message-ID: <20260625124119.GW42921@noisy.programming.kicks-ass.net> References: <20260624121327.190063948@infradead.org> <20260624122451.583174198@infradead.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: On Thu, Jun 25, 2026 at 05:26:03AM +0530, K Prateek Nayak wrote: > Should we treat core_pick similar to task_on_cpu() and go down the > stopper route like: > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 2f4530eb543f..e7f64f34aa4f 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -3049,7 +3049,9 @@ static int affine_move_task(struct rq *rq, struct task_struct *p, struct rq_flag > return -EINVAL; > } > > - if (task_on_cpu(rq, p) || READ_ONCE(p->__state) == TASK_WAKING) { > + if (task_on_cpu(rq, p) || > + task_on_core(rq, p) || > + READ_ONCE(p->__state) == TASK_WAKING) { > /* > * MIGRATE_ENABLE gets here because 'p == current', but for > * anything else we cannot do is_migration_disabled(), punt Bah, yes. Let me go stare more at this.