From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 91F473B95F6 for ; Fri, 27 Mar 2026 09:27:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774603674; cv=none; b=r+R0Kwd44KezcJcY8ZxiCMxJIhK+/K30dSDxZAHuuRD478Izg1pD0WOJuYwIaa4GgZesC93YHY7JETcdcxT6g3FL8yzyMrb1eSAnoK/XHD3rWnoMG5/tOsfGXZlr3v0tBgfCKTpFmLNKV+nB8AVBBQqoYRVJFgQyRvhki8PjIrQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774603674; c=relaxed/simple; bh=yKHeji76+2EQrs3qgIuusR3nbEaF9pUBuV1dznNH1kw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZpDeDNy4Z6elhdBP9N6abfu2/CPJuOs4QSrDgvFTOk67PF571PS8ytxEmii5+LTJYzA+DR+mwvV9+HdvtLWD/AF1Mc4ZKodrfLyBFvQ2z3HUeQdZJVkgrXXm+QG2RjhVkmMiF1a3i40prutBrEabuJK5rgz8Bj9L22OwaeOajjc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=s0NzLIoY; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none 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="s0NzLIoY" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=bg7EO+fSUQ8+nYPnfmD/bVxbMe2qy2xPMGxGLWHv78E=; b=s0NzLIoYwlf5IZbxcIp/SJuD74 +OqJ6RZI1l8/gik8PEhWrisa2t8H8v2usCJZSsVi5Ij18cEwOKyaniQ4dNeiMncrIgf/GvPMQDOMu FRlB6qsCXaFB54u9NW+/72sLQT+yKpFMPSZ9H6Z3T+/35VfnC6BVbUJrG0AAtaCG7gRmowCIivEwL QKztkTaCNZzWkYhJDEzVERZd6/F6iQH+/e+2CAHFIscYVK6YSw6N1Vp/vMX5sP3Fx6FsbSUoXp92F lFPiAw0uikmp2Lo9uhLiC86MxKM6Jat1zB5MMGwSJtcGRn7i0BJfBCebgMB4i76qSsRv7EHRrJYBa u1fdvi2A==; Received: from 2001-1c00-8d85-4b00-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:4b00:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1w63Th-00000001ZmQ-1lv0; Fri, 27 Mar 2026 09:27:41 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 6CB6A300E56; Fri, 27 Mar 2026 10:27:39 +0100 (CET) Date: Fri, 27 Mar 2026 10:27:39 +0100 From: Peter Zijlstra To: Yu Peng Cc: tj@kernel.org, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, jiangshanlai@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched,workqueue: Use READ_ONCE()/WRITE_ONCE() for wake_cpu accesses Message-ID: <20260327092739.GB3739027@noisy.programming.kicks-ass.net> References: <20260327073007.254673-1-pengyu@kylinos.cn> 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: <20260327073007.254673-1-pengyu@kylinos.cn> On Fri, Mar 27, 2026 at 03:30:07PM +0800, Yu Peng wrote: > task_struct->wake_cpu is used as a wake placement hint by scheduler code > and workqueue's non-strict affinity repatriation path. > > These accesses are intentionally lockless and stale values are tolerated, > affecting only wakeup placement. The scheduler usage isn't lockless. And I'm not at all sure why and how workqueue is poking at this stuff :/ It has no business poking at it.