From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-40133.protonmail.ch (mail-40133.protonmail.ch [185.70.40.133]) (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 5A8FA1C3BE3 for ; Fri, 28 Feb 2025 11:32:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740742328; cv=none; b=bpBT3o5Ut8ogRn22012CmhfzBYyEuJD+MQihjuzFTlMSHCmMQebGLtQtsEWRebQZQfvh00hLtbDwjW3kyjdFWFbYcJW1V+0cz35AelqJdmYq4hAV/xuMpX79PbDsH7vmDiMctgy3KxQkF6zaHaskRt5FCw+wNIDUxKki3KNmIpw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740742328; c=relaxed/simple; bh=XKAV4/E1+is1J8a/5HPRUiraTYH/wEodr2IoF9LyrXc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aH39K8Xs8GGQ232699JcOO+ri21Fd4B1zzBRhhKBIvjgHLXteTyIjm2NH1sudsSlpYIeqNS9nTpD3Ua49ymlRWCVr8paIBF7dxyrgvGyRdW7kxgFkTxjBq0LVw8pemARrEGataFjQlkAU9XLZYNzYg1vdzNYWwdo6AaqJW52Y14= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me; spf=pass smtp.mailfrom=pm.me; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b=nzweEyOB; arc=none smtp.client-ip=185.70.40.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pm.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="nzweEyOB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1740742319; x=1741001519; bh=WnuT1lp+dEjui9s8JRMd2CxOSptWUukiYdlX90A/SL8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=nzweEyOB65w0CUoEAmf8Kp9DIVwwyrvkN73tjaoaGx37fVwZHQuTwfVMnOfWZZ83k LgiuZSMmTGSJpRKtN8JRj72JB6qmII5IA4dk3CgOohhiFeCXR2W+oau5j8Z7gHwAor BQNl6ap99o5BgskhP4lvv92PeKAKH4L/9II9Of7UhY4kwuhgvhvIi+yZSddVSJ3uF3 ibfAq2CkA0cMJlAqeGVwE/M3vFms1eucY+O+K+SODBlLKLUghtuvqjS3VEb4HaiOt0 5LtQsUuQO4CvDJpcr0/OhaGe1RBjPqXla39/agU2LSTYs+oUNG/B5oQF0F7l1f7uop v5G+ArcAG7Prw== Date: Fri, 28 Feb 2025 11:31:53 +0000 To: Andreas Hindborg From: Oliver Mangold Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Subject: Re: [PATCH] Rust: Implement a unique reference type URef supplementing ARef Message-ID: In-Reply-To: <87wmdamiik.fsf@kernel.org> References: <87wmdamiik.fsf@kernel.org> Feedback-ID: 31808448:user:proton X-Pm-Message-ID: e8b37f6015c1c6870e1d3bc1e0e2a0186c0198ab 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 dep= end on this patch. You know what I mean? Best regards, Oliver