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 E75291643B for ; Sun, 8 Mar 2026 00:17:47 +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=1772929068; cv=none; b=ceZ9vFhgINxgM9t+NEuHSf1nZhRYLYBnexUBFrsI/NUd4tW6mCeCxfhP5D+Q0Ckid2JfIbS9A4fwRC6HM8TmtiUuNkzuE/RNDU1qQW6uhuNp5Woky93jvfoHex1aKTh9x0Pdp/dOHlRGVDfDciYIq2FPHrz96xVc4VKMAHrqUZc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772929068; c=relaxed/simple; bh=LQLxUVdJiKtqIslzmafl2YTI7FuBlHHJVHnDc1tsoy8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lJTIVIJWJaq9KYZ4amYxri/wa8O5c6JsIePKXMlCKZAKTuokJr8khP3XWdSGHg5xFyWONsMW/xzM2VqIe0BZI2YzDFFDJrBfbVRYPmB++pnulrYz4fZsfOB97dwFYbSsTFfl9/HDuqjlyyInYJ7AYpfF4XveOoLqV/7h9vSEwU0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oAb0kV6v; 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="oAb0kV6v" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52D4FC19422; Sun, 8 Mar 2026 00:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772929067; bh=LQLxUVdJiKtqIslzmafl2YTI7FuBlHHJVHnDc1tsoy8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oAb0kV6vDRnHR8QZJJI9gn1Vg8iF9u/Z6c1XTq5sXcuTNLC5ZBARc1njpB9ugTdMC yMno5CowkoUZjgKzjFhyDNnh80WcyApgZCLevh0kyl+Pa1GDQuuD1Ors+Ex/cHGSGk KTgg2typEHAlDCYGWIdXBh9SFofUlktYzfMo3xtpIMP1FRGeGPAXDo2HS26ppZTqMh txErYoEY4NzyQyr1lyAj/oBjqJv9zx9nx4XnGdSEL/Cwgy+mrD6KbDbnlojwcqcT0i Ps5Y29G/6qrPPh6gAJWszrUbo9bZfUjMSEzBJNNyRV5E3EcmMqX4IRAcRGsX3J30a6 cRpTkfIBiDGxg== Date: Sat, 7 Mar 2026 14:17:46 -1000 From: Tejun Heo To: David Carlier Cc: David Vernet , Andrea Righi , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched_ext: Use READ_ONCE() for the read side of dsq->seq update Message-ID: References: <20260307233204.30749-1-devnexen@gmail.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: <20260307233204.30749-1-devnexen@gmail.com> On Sat, Mar 07, 2026 at 11:32:04PM +0000, David Carlier wrote: > - WRITE_ONCE(dsq->seq, dsq->seq + 1); > - p->scx.dsq_seq = dsq->seq; > + nseq = READ_ONCE(dsq->seq) + 1; > + WRITE_ONCE(dsq->seq, nseq); > + p->scx.dsq_seq = nseq; Does this actually trigger KCSAN or wsa this just generated by AI? dsq->seq is protected by dsq lock. I don't see how dsq->seq load can become a racy read. -- tejun