Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp442819rwr; Thu, 4 May 2023 22:48:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7DNCE1VgztJTHOz8H5MV6MfX8RRxYQQBX/2nVrXSdPHIWR0jp7YxSOdWMPNNulP9hwITzO X-Received: by 2002:a17:902:e748:b0:1a9:a478:66c5 with SMTP id p8-20020a170902e74800b001a9a47866c5mr296364plf.63.1683265698017; Thu, 04 May 2023 22:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683265698; cv=none; d=google.com; s=arc-20160816; b=LKTUHknnFEqTHuZcsPdGm1XvsmnUYBg+kOfBzAOm8Iy+Ip5sqCmGDTO102cE+GXKlk SErL/HSxqRhRRnH9imFe/ZzdMsMrBIbR3EXpGzrCfw5KlItnGFB0VeUQCGXJCGnia1un KRXq3xYV1CoXi+AgBEC9RA5CdYw7Lgxrk2xw/IGiehGDpZZTSDhg8JXEDG0jM8woMS0c 4tC1dIW+4S5maQRX7flGuM3HfZzutqgQcRKv12rIXJwT7MdKF49F9sU7XNWvefvrKsMT O7gMcmxiTSTSOb0UD0UB94DztzPxuCcWlZAgQY68zrzFPO0EH3Uaz7iH1hjaAFk/fJhQ cgow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3Ssm+pIX9YCKQZ/c1PpYxJ+8HNAswjWjxy5lFzztysA=; b=tcuDec7Kp6y1LtdYN3v+g92JhiI+dpDYM8msqk/AesIEbdc7i40oHuEhxt88tzDRuD /bp/ardPZIKO7j53AR8SOiR9uzxRTGribJJ6rBz2IZiwXhHpcHmsigVhDLeaL3nKTff9 jviVuYYUZeVPybSP28FX/FMREEQopQulGe852ejluYN9l+YVQsdwumudrCjxsm25/FpP 7veuXtWhI88jZlbNcrIuuK03uDrY6Dxx5CBDmvIWh/TvKIIqE7wIS0ra2nGtORJUE8CY dvTa6+I7YAxCjfRJuvlBZwtcmIIAxQRXaFCeqfXclIjWOHAzO7sisvd8w3tht3uUNQx8 sY5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=fZXbEvrS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a170902900700b001a9770780d5si852425plp.343.2023.05.04.22.48.04; Thu, 04 May 2023 22:48:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=fZXbEvrS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230349AbjEEF2Z (ORCPT + 99 others); Fri, 5 May 2023 01:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbjEEF2X (ORCPT ); Fri, 5 May 2023 01:28:23 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85B8311623; Thu, 4 May 2023 22:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3Ssm+pIX9YCKQZ/c1PpYxJ+8HNAswjWjxy5lFzztysA=; b=fZXbEvrS+vEDWxt4U3MRxo3LHT WaxYNHaJAc96HKrfswX/fCumBI7Ru9SSckoMu4booL7ZGDgoAGaL+A31oneasr64X5zzWg6lmrlD3 iqIZy7KDMUaIaVciDMJnMb459bFN65MaK/YPY05JwyKwCMaRiQKAp19j01qEWgE+daK2NjhFdSm0T GQTh9uu4g+LjAYJXE5ZMwfO0s0oFJ1vMuGNCkMeCdxJM4xylu/RZlpCGoqkPcwrA1NiAhMKd5jznQ G9a6Vn5GLH06y4RU2kRSkixk3JR8MVVfK7RGnE6Zt9EFaTAgmYpevUmUbPsgelTmCdVME7F5AWd5h zzcfAzyg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1punzA-00BFoZ-BC; Fri, 05 May 2023 05:28:04 +0000 Date: Fri, 5 May 2023 06:28:04 +0100 From: Matthew Wilcox To: Andreas Hindborg Cc: Jens Axboe , Christoph Hellwig , Keith Busch , Damien Le Moal , Hannes Reinecke , lsf-pc@lists.linux-foundation.org, rust-for-linux@vger.kernel.org, linux-block@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , open list , gost.dev@samsung.com Subject: Re: [RFC PATCH 01/11] rust: add radix tree abstraction Message-ID: References: <20230503090708.2524310-1-nmi@metaspace.dk> <20230503090708.2524310-2-nmi@metaspace.dk> <87wn1ns7kt.fsf@metaspace.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wn1ns7kt.fsf@metaspace.dk> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 05, 2023 at 06:49:49AM +0200, Andreas Hindborg wrote: > > Matthew Wilcox writes: > > > On Wed, May 03, 2023 at 11:06:58AM +0200, Andreas Hindborg wrote: > >> From: Andreas Hindborg > >> > >> Add abstractions for the C radix_tree. This abstraction allows Rust code to use > >> the radix_tree as a map from `u64` keys to `ForeignOwnable` values. > > > > Please, no. The XArray interface is the preferred one; the radix tree > > is legacy. Don't make Rust code use the radix tree. It has the GFP > > arguments in the wrong place, for one thing. > > I have a similar argument to not using xarrray as to not using folios, > see my other response. But the Rust xarray API is in the works [1]. But the radix tree API is simply a different (and worse) API to the exact same data structure as the XArray. Using the XArray instead of the radix tree is still an apples-to-apples comparison.