From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) (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 5C16F2E7F17 for ; Tue, 18 Aug 2026 13:49:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.161 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787060944; cv=none; b=DkAJHhOSk6eZ1u74kTGvGTZksC333e6/UMg+rhS5fOv9foq5X0BIXWX/2rpWDv416kPfBjQzG/Jb9CYXjUMXlpOqRse57Q9F5z2/KiZ8sE5JVs4l0csk2VuO0t9gHx/J5t/LQAeC5uEIkamrLoNFLNLMgWJCRMN2ZRgV0PI1zQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787060944; c=relaxed/simple; bh=vnCWKIEbXnzvERwfK57jvlqaRf+FfEFLIfp/6YtNPbc=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=JFzeYB+XOpbqheG1eyJ+9l7cLM98PyQx64N91moZiF89q3yYApZAEYDWL9FUR0+T0oR5ssWpPHxet3A6iiptlafzutlsn5jHAw/xLEHDTFiW5mIrmEvvlt9qW6ceKfW4gZlKrRZSu8aanGbms5z4GdKOyonMZfKIvHQYQslbfJM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=BPwkbCNL; arc=none smtp.client-ip=80.241.56.161 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="BPwkbCNL" Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4hPWJM4TP4zKnRY; Tue, 18 Aug 2026 15:48:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1787060931; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vnCWKIEbXnzvERwfK57jvlqaRf+FfEFLIfp/6YtNPbc=; b=BPwkbCNLIRSHMz8a++I5W/oFHKAzHQo2XlZbuIXvTF/MpufdGACpfczf5uR0x991kUDogu Myzy3mGafM/reD5OIbqoPPQEtfxdhh9RxHQlboAszqL4J95N79pv9UE5XcKHJxWPKac+aS TiHy+j2lZ5Yz9d+9dFC4NQhFgdo5YlWMGr2mhuV32jud9hwWkPLdezODVV8ZlHWYfpwPzF B5C2WWq96Rdx1TAyNGj7h0tYszEVrzBaWybTcocdoMqNcAjVXqEUTU5WLwRG3Q3IwGD71q f2RikpnNY9nYIF3+5moIJeApXt9yxL4ThOT5/1T6iYjBDXD3rGvkdjzlu1pA3Q== Message-ID: Subject: Re: [PATCH] drm/sched: Lock drm_sched_entity_is_idle() From: Philipp Stanner Reply-To: phasta@kernel.org To: Tvrtko Ursulin , Philipp Stanner , Matthew Brost , Danilo Krummrich , Christian =?ISO-8859-1?Q?K=F6nig?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Date: Tue, 18 Aug 2026 15:48:46 +0200 In-Reply-To: <2dd34398-3ef2-4573-8311-60e5f6b346aa@ursulin.net> References: <20260813094539.2407911-2-phasta@kernel.org> <2dd34398-3ef2-4573-8311-60e5f6b346aa@ursulin.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-ID: 02b1ec67361eff4ea6a X-MBO-RS-META: 9se6gi9dodrtjawr1k5b5kosz8jwnyt7 On Thu, 2026-08-13 at 11:37 +0100, Tvrtko Ursulin wrote: >=20 > On 13/08/2026 10:45, Philipp Stanner wrote: > > drm_sched_entity_is_idle() contains a badly documented memory barrier > > and an invalid lockless access to entity->stopped. Moreover, it also > > accesses entity->list which is at all other places protected by > > entity->lock. > >=20 > > This function is in no way performance critical, so it is safer, more > > readable and more maintainable to take the spinlock. > >=20 > > Add locking to drm_sched_entity_is_idle(). > >=20 >=20 [=E2=80=A6] > Spotted by chance on the mailing list but I believe I gave you r-b for= =20 > this one already. Applied to misc-next with your r-b. Thx