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 99CDB2DAFA9 for ; Thu, 26 Mar 2026 02:19:45 +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=1774491585; cv=none; b=LsqO4xkmWsJFGvbOZJypl/2BmpfR33TdTUHbBiAaDIeE7UOSO6sPlQvPq2dicWyN4AHrozX1dt6wFMzpYY3G/WKkt32NITAUSEOSlNirOVh0lyKaBZHLw+YK0UfuJXfh7YNODZbq46Bn163iGBbQlLU7rJ/8IKC7IuAuWyw1toQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774491585; c=relaxed/simple; bh=xjze9U0KGxUtPZhnGjAmYRMpkSRQ9LRTSM1swxtBVH0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sIvAYCwXeg6UJszh6TxnvcTonTXHi1DowmxjoRl8/Sueee5n3LXSep8AhfdCSFvjN+MhsYFJ66PO5KaF7K7Z/VWyFug2H7zawUg1li/cG1jrPHeuHHm2khvudiKc3c2X6fQPEcFgOefxvE/WkDDjWAv+3TvO0tcH9vOJ9XEimoc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sre7zWdJ; 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="sre7zWdJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40C39C2BCB0; Thu, 26 Mar 2026 02:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774491585; bh=xjze9U0KGxUtPZhnGjAmYRMpkSRQ9LRTSM1swxtBVH0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sre7zWdJkwyHIBVNbNcQdwkoTMBVvPqAPpBUsifEItoB9/faCUfVf2/2yJdPlXxOp tgZNjsFi1PYwcyJahXWzzXXqu1U5VZkj84iaZ7DmNIPdjZ00YVnZs38rQK2jYJj889 vdtczH+Wny36V19NA3gFD5ubR0VVbjeZjHQBsLOaGbqGoazg80XOG33dFXNqzdOMIZ A/WeWwEYMih49HI90FltiIyJs1Q/TEiJjxlJSFrHmRlPsD+qoNXNc1/cz8gTi5yMnr 7Bwh2k4uLbwNbKHM61so7z2MY9nPlcLEswRfdwSGo42iENpVsRr+/3XN8XjLXj1fQl Q7EGtD88RoXJA== Date: Wed, 25 Mar 2026 16:19:44 -1000 From: Tejun Heo To: Matthew Brost Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Lai Jiangshan , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 01/12] workqueue: Add interface to teach lockdep to warn on reclaim violations Message-ID: References: <20260316043255.226352-1-matthew.brost@intel.com> <20260316043255.226352-2-matthew.brost@intel.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hello, On Wed, Mar 25, 2026 at 06:49:59PM -0700, Matthew Brost wrote: > On Wed, Mar 25, 2026 at 05:59:54AM -1000, Tejun Heo wrote: > > Sorry about the tardiness. Traveling during spring break. Getting more than > > I can catch up with each day. > > > > On Sun, Mar 15, 2026 at 09:32:44PM -0700, Matthew Brost wrote: > > > @@ -403,6 +403,7 @@ enum wq_flags { > > > */ > > > WQ_POWER_EFFICIENT = 1 << 7, > > > WQ_PERCPU = 1 << 8, /* bound to a specific cpu */ > > > + WQ_MEM_WARN_ON_RECLAIM = 1 << 9, /* teach lockdep to warn on reclaim */ > > > > Shouldn't this require WQ_MEM_RECLAIM? > > Yes, so what is suggestion here? If WQ_MEM_WARN_ON_RECLAIM is set > without WQ_MEM_RECLAIM fail the WQ creation with -EINVAL? Yes. > > Why is this function necessary? It feels rather odd to use wq as the source > > of this information. Shouldn't that be an innate knowledge of the code > > that's using this? > > This, for example, would be used in DRM sched (the existing scheduler) > or DRM dep (the proposed replacement) to ensure that driver-allocated > WQs passed into the layers are created with these flags. DRM sched or > DRM dep has strict DMA-fencing, thus reclaim rule that we expect DRM > drivers to follow. Historically, DRM drivers have broken these rules > quite often, and we no longer want to give them the opportunity to do > so—lockdep should enforce them. I see. Yeah, that makes sense. Please feel free to add Acked-by: Tejun Heo Please let me know how you wanna route the patch. Thanks. -- tejun