From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88BFC34DCDF for ; Mon, 23 Feb 2026 09:15:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771838106; cv=none; b=h59QJJuhj01aZX1ifs3XOoQs/2e9/eAjBRnlqQYPFnDfmAToGjAcYYPcsZNL1HxyNqKnC58jGY8oyD17sAOnmSLNUlHe9WtE17+yg57nGdE+yKuiTsjGxBujVhA07+1GjsyVSFMnjU0hUgtXlOPk2LiRHTHo/3g79EO2rsMSey4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771838106; c=relaxed/simple; bh=WnCVSVyP0du3aW6xgB13h3WYPrZY9fXisXZmNJUw1fc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ZdAfGQI0MtJUkkV1U24dryrnUU9rLeD/yzqn6//U0HvOKRSnd9ZgYVwDEe0sRMNQK92V540ev8mgMYA0hoMB1luzwkZe1gTpWwqNi+2633K6sg5QNgqCRkp9nUSZDANgISHVUImUUJ90RuUjMw3LLvKTz3zlbmvBe7iJU4Kjzl0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=fxbpdLDS; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="fxbpdLDS" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-4837b9913c9so42257705e9.0 for ; Mon, 23 Feb 2026 01:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771838104; x=1772442904; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=vOcHT801aqXoK3tA38lkJBGJrXjsRTU5HQwu+hWqDEo=; b=fxbpdLDSpCuDHWiWq8iYRBDFnd+gHO90u9lHycAEX81v74Gya9raCGBEG8FMmNV5WQ 9EfDJ3vKMJV22mSMX8HtDEUd5RlzxmpxhTrOMo/M+/VjG/MhaBd967ikEPabtadjP8T/ QnK7mbqahRoROqAYLmdpsJo4zsDsa1SjCDCEGTxwb4FRuGV9MpBCJbZlYDn0MLnmzfBV JUh/Fcncs1QGG6XQG6JPsHsRuwQUqCNMudzo0Qf6eO3DP+Ya/lI04x3r2VlyczlETDay AtV3s1sSuwrk7Uv0Ttb5VzfqoBgY1pOY5grmf2KqB7GlBCRpBDGinl/AxzeikCJ7YJ1N 23Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771838104; x=1772442904; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vOcHT801aqXoK3tA38lkJBGJrXjsRTU5HQwu+hWqDEo=; b=EMTcDtfcj3ZpxB5K7GEhIlSqcdy4lTTyorIr8qHWweRDV75WSR3hxXSFKSa99wPrFE b5RuOZX92TIFpv/3tE7LaWpxxuVzLJA1Fqz9975STPErPDAsc6N9qhSDUHjvMVxQUHNS UyvxuGULkhgDFpI0MxMbHmT71K8n4Fct5aL3SbHY7x/Dy6hWmAgJ79L1SfqnBvSbx9nt uRK+lExC+BmQstJX6+cyw30fr3S3d2AxpjouTQKXJYjov5pf6HEslX/WJMGplXGuXKBP uLp8qK22bp1HSiJmxyTSf6quDYepICNNmmeZXdlnBoMcGUlvUXai8/u+R6nWHV9kiJUq 0zlw== X-Forwarded-Encrypted: i=1; AJvYcCUvrAOGykjOqwpJWmIDL2LV73dGJxKWc3BfzrnLGMgngoEDXTay/Kn5NU7LK6s470+9A3aSL0Ie71El49o=@vger.kernel.org X-Gm-Message-State: AOJu0Yyr4Lk60zIjhiKZxyF/gnwbYIxM+K0xxL7TZYAp4pcRwHTVm49W x3ykMEyKzJo/Kj1UbEy52biMq1FVEKJveeeVdk9OWVGBKg91ERW4uiVB8P98d5JBZpcDJNzYMXo K6TcS0sft+1Tw3koZvQ== X-Received: from wmqa20.prod.google.com ([2002:a05:600c:3494:b0:483:1069:2eb4]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:8206:b0:483:75f1:54f with SMTP id 5b1f17b1804b1-483a95f8a84mr142893835e9.31.1771838103699; Mon, 23 Feb 2026 01:15:03 -0800 (PST) Date: Mon, 23 Feb 2026 09:15:02 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260130-gpuvm-rust-v4-0-8364d104ff40@google.com> <20260130-gpuvm-rust-v4-3-8364d104ff40@google.com> Message-ID: Subject: Re: [PATCH v4 3/6] rust: gpuvm: add GpuVm::obtain() From: Alice Ryhl To: Danilo Krummrich Cc: Daniel Almeida , Boris Brezillon , Janne Grunau , Matthew Brost , "Thomas =?utf-8?Q?Hellstr=C3=B6m?=" , Lyude Paul , Asahi Lina , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Sat, Feb 21, 2026 at 04:09:41PM +0100, Danilo Krummrich wrote: > On Sat Feb 21, 2026 at 9:46 AM CET, Alice Ryhl wrote: > > So, should we get rid of GpuVmBoRegistered in favor of ARef>? > > I wanted to avoid exposing the reference count, as I suspect drivers might not > need it in Rust, but I don't know for sure. > > We could also define it as GpuVmBo(ARef>), where > GpuVmBoInner is private, but I also don't want you to go back and forth with > this in case it turns out we do need drivers to be able to take a reference > count and I also don't think it hurts too much exposing the reference count, > even if not needed. > > So, either is fine with me, ARef> or > GpuVmBo(ARef>). I don't think GpuVmBo(ARef>) works because we need to be able to talk about both ARef> and &GpuVmBoInner. The reference type is returned by several different APIs, so the Inner type can't be private. Alice