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 BCEA6335574; Fri, 19 Dec 2025 12:15:14 +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=1766146514; cv=none; b=QFADyAJZInxD0zahsoMX3MrkIO2ZLLVJOC9VPeq3ihO+DUvf6M2enp7r0xHw5Wpx0HcXsau0foI4ciddUkC0g7kEzyUZSDNF5fNG1IX4pYBcyIBnHU0O/YwdN7AnuF0YM9RzF3xfDYtaiobTHkm64CeQNOYPmP95bKtcep+JYbU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766146514; c=relaxed/simple; bh=zr3MOIdRIiLo5rQVA/Ls8ftqQmh9k+HKygN/fGUhHUM=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=VBMo9x79vxWFL9SVZSAwjZjdb10ajk3HnKgy1eqkQm673T1HvmrwAcD0KTGYgJi4r71LXPYdbII0JAaqIvzClA7HGtczHQM4ncpDKEunTvxzEAWSulvWXEGvxJm4MhQIAkXPTMjaml4NapN1lsACt2S6uPXT7W/fSbZ1ZQkl78A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GZI+KIIM; 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="GZI+KIIM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A36E2C4CEF1; Fri, 19 Dec 2025 12:15:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1766146514; bh=zr3MOIdRIiLo5rQVA/Ls8ftqQmh9k+HKygN/fGUhHUM=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=GZI+KIIMKdrldmwo7anW9rvr4aLsQBZAC9pHRgRsTbVfoUDi8BU6ovBSAJYDNojJh 4AYAUZonScKOOogC43EkXDdgB04ocA8/I5WdYaWRnXC8I6s6hlfcjVZrZOmk0glcjQ iPgk0U6tK4L20VCTNJbufSlESIsU620vyTVv/beEcIAlqx1m/rD8o2RM228EyXbNiZ SDBQgev8wOx9x0nh0FR1geOg+/5LPLtX1dOYq7Sevx09h/yPEn8K5XoCwW9UwIVKHl fuKOEaTs33EyjO4TMdIoTR0BvTGHRMJrgHgQ1rHBQT/rIyqGZzr+qbMfvwOcuHZHyT GmcaQve3a1qGg== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 19 Dec 2025 13:15:04 +0100 Message-Id: Subject: Re: [PATCH 1/4] drm/gpuvm: take GEM lock inside drm_gpuvm_bo_obtain_prealloc() Cc: "Daniel Almeida" , "Matthew Brost" , =?utf-8?q?Thomas_Hellstr=C3=B6m?= , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Boris Brezillon" , "Steven Price" , "Liviu Dudau" , "Miguel Ojeda" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Trevor Gross" , "Frank Binns" , "Matt Coster" , "Rob Clark" , "Dmitry Baryshkov" , "Abhinav Kumar" , "Jessica Zhang" , "Sean Paul" , "Marijn Suijten" , "Lyude Paul" , "Lucas De Marchi" , "Rodrigo Vivi" , "Sumit Semwal" , =?utf-8?q?Christian_K=C3=B6nig?= , , , , , , , , , To: "Alice Ryhl" From: "Danilo Krummrich" References: <20251128-gpuvm-rust-v1-0-ebf66bf234e0@google.com> <20251128-gpuvm-rust-v1-1-ebf66bf234e0@google.com> In-Reply-To: <20251128-gpuvm-rust-v1-1-ebf66bf234e0@google.com> On Fri Nov 28, 2025 at 3:14 PM CET, Alice Ryhl wrote: > +static void > +drm_gpuvm_bo_destroy_not_in_lists(struct drm_gpuvm_bo *vm_bo) > +{ > + struct drm_gpuvm *gpuvm =3D vm_bo->vm; > + const struct drm_gpuvm_ops *ops =3D gpuvm->ops; > + struct drm_gem_object *obj =3D vm_bo->obj; > + > + if (ops && ops->vm_bo_free) > + ops->vm_bo_free(vm_bo); > + else > + kfree(vm_bo); > + > + drm_gpuvm_put(gpuvm); > + drm_gem_object_put(obj); > +} I think to us it seems obvious, but I think for new people it might not be.= Can you please add a comment that mentions that this is about the evict and ext= obj lists and explains how this is related to locking?