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 1B3B02528EB; Fri, 28 Feb 2025 12:17:05 +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=1740745026; cv=none; b=IlcwOr1osxat28xeVnAIqLN/vGSkQGiJIMTsxSArJCgqwBD0l9NcJbqwdVnGJICOcIRn1Qxp6uru/19gXbgPrCWf2oBVmXcOSOu9jNbEWoWPdQe+ZF61C4BnvAw+4efT4I5RXNubHbCZyGVUDYl2Q2csXwPz5aHc3M3ryjBJiKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740745026; c=relaxed/simple; bh=Duc3LTiA2wcifNotLp2bQHF2mAJjeJGKFn3hYnPif5s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=mvLZXUXZb+y4Zv7PeEsZk81yoOX/ceCDV6Da/LzRVh2L5oaSH+wMqBpdPFReiYntLLmRMAA5oDsdS0dB83b9rQzMLmKrDhUMAbMH0wf1BvX6gqGU1Y0aFY8zmsNrw71nvjtHiI0aCUHmolSz/D6iABVS/3xIe5rdwRCPTkPnUqE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qd2daEVc; 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="Qd2daEVc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B671C4CED6; Fri, 28 Feb 2025 12:17:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740745025; bh=Duc3LTiA2wcifNotLp2bQHF2mAJjeJGKFn3hYnPif5s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Qd2daEVcdYHgzDyTYv9omT5Uk1DPc4nRmFufArdjPNTnlZ5BawsUPYE4tYQfo1p5f DxTefvh7SLpf8BDxTyKDN2uxfbFPG8hgxvYNVJ6hcGV9VDUqpaMAYFMJqslzMD58NP k5m5x3q2xYdGF13UI3rw9bh6Z957WQ7OM8nX4DBIwjlXOsfcfSbt1q1TDsg0itqNgA Dr27dlJ/Gf085upL+2zdmK+izP5FP3tKKdtOL/9Fsqp3G2DfRQ/WK8ic9GnuCCLqYE uAPwNe3JMOdmYdV6j0hnUt5BqHAUVWzM6mGX7KxR6BRxTuTGgJtI30sHvmRrB0qPY7 uaNQLMsdEwALQ== From: Andreas Hindborg To: "Oliver Mangold" Cc: , Subject: Re: [PATCH] Rust: Implement a unique reference type URef supplementing ARef In-Reply-To: (Oliver Mangold's message of "Fri, 28 Feb 2025 11:31:53 +0000") References: <87wmdamiik.fsf@kernel.org> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Fri, 28 Feb 2025 13:16:57 +0100 Message-ID: <87ldtqmfgm.fsf@kernel.org> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Oliver Mangold" writes: > On 250228 1210, Andreas Hindborg wrote: > > Hi Andreas, > >> Wrap at 75 characters please :) > >> See `AlwaysRefCounted` for reference on formatting. > >> Please use back ticks for types: [`ARef`], [`URref`] > >> For your next version, can you run `make rustfmt`?: > > Sorry for all that. Apparently I need to get used a bit more to how things > are supposed to be done here. Please be patient with me for a bit :) > >> When the trait is unsafe, we need to specify the conditions under which >> it is safe to implement: > > Of course. Sorry, missed that. > >> I would prefer `UniqueRef`. I know `ARef` has a different naming scheme, >> but I think `UniqueRef` is sufficiently short and significantly more >> descriptive than `URef`. > > Ok, will do. Honestly I also prefer UniqueRef. > >> Also it would be great if you include your "rust: for fix dec_ref for >> URef" folded in. > > Are your sure? Wouldn't the patches have to be ordered like this? > > this patch (mine) > rust: block: change `queue_rq` request type to unique (yours) > rust: block: simplify reference counting scheme (yours) > rust: for fix dec_ref for URef (mine) > > IOW, the latter requests depends on the 2 patches of yours, while these depend on this patch. You know what I mean? Sorry, yes I meant "rust: allow to override dec_ref() for URef's". Either include it in the series or fold it in, whatever makes most sense. The request update can go later. Best regards, Andreas Hindborg