From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2604B3BB10F for ; Mon, 29 Jun 2026 12:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782734976; cv=none; b=RwK0a8ckvs168UbnBGKm7Vb2n1ONZ2ac7oRHYPaIgWisGQKfZ1nJnxbJghHM57invkGCGNSbbEEfU9FLretx3sLKyuSoZlMvzHkikma6iRRTDfxmbW2ctJR2p1ID7E37kvX22Rw5rtX+8mDBRpUWkcVbyEAUEucSQ/YI3PfRNe4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782734976; c=relaxed/simple; bh=XhAnqC/vUiB1NJ7PpfT3wHJZu6PfkNSLn9yo/qTjZQw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=m68AC9hlJHs3K1z/uBdwW2wUc3lUZs1Asy7JjzG0UlETBBwMh4wN+MLE2MhRn9F0XemOOnxgX1eRHasWoJC0ycq8lGIkgTMkvcUHdI9wGcSkpINB0e+VQIDKgGV4UhyZiPNpX4bGAtUT0W6Nj+G8JhXgrOIlYeCXM/iE5eLPRVE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oWOu9XeD; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oWOu9XeD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A4571F000E9; Mon, 29 Jun 2026 12:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782734974; bh=gO7vksODGeA6boCayY1A9JuxqrUFKMw+C8sb90UNlR4=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=oWOu9XeDVQ+t70CtakGVe85lb/PYZj8EZ0nVxHUsudH8riLgsWTGW5slBK8YxG1IT cLDlvJMBMx0unf7aSdhlDyrzOnid365JQCgqYNY+tIF2V4CCj+59Wqb8dyoRUgCeex ud26FgFvxVcbUAS/NaMo0/FrXcpB/ElWZzme1eeLtHXhNiudHAT2bVzBdNgE7kmat8 bprqA5FulgYfeIp2Pafa8D1NzyKuPWRyuknilFThFPBpAPXtM/JnFprprLGKlPg5Ot 1RjfeJUvosElCKxgI5fDaXV/qKGRZ2bno9lIHRekpMAyEPP1twH3nc6KnK0ZXpVi0/ ekI2vZQtgue1g== Message-ID: <5ed4ecfe-05bb-4bdd-9aa3-155e1d926861@kernel.org> Date: Mon, 29 Jun 2026 14:09:30 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] drm/sched: Guard sched->ready with ACCESS_ONCE() To: Philipp Stanner Cc: Matthew Brost , =?UTF-8?Q?Christian_K=C3=B6nig?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20260629104040.2695163-2-phasta@kernel.org> From: Danilo Krummrich Content-Language: en-US In-Reply-To: <20260629104040.2695163-2-phasta@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit > + WRITE_ONCE(sched->ready, false); Don't we need smp_store_release() here and > + return READ_ONCE(sched->ready); smp_load_acquire() here? Also, what about drm_sched_init()? It also seems that this is accessed from amdgpu without the drm_sched_wqueue_ready() helper about a million times. :) $ grep -Rin "sched\.ready" drivers/gpu/drm/amd | wc $ 119 544 10320 There may be false positives, but from a quick glance at least most of them seem to actually come from the scheduler.