Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp954860rwr; Thu, 4 May 2023 11:54:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7GBDH9EaWSXkXwyy512X0rXHaDwaIpXWPEChHimVDGTijQ4S6Qlhw6pW1pOQgeyDarRFbl X-Received: by 2002:a05:6a00:3698:b0:643:6fd8:ea7a with SMTP id dw24-20020a056a00369800b006436fd8ea7amr3706913pfb.16.1683226459007; Thu, 04 May 2023 11:54:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683226458; cv=none; d=google.com; s=arc-20160816; b=bzkFLABNk7mLajYHJa4tmk42Xg3gZj42lAY03tvRl356f6q3ms9jfouJ6o0L1JzKfM BEmVlKa0vf4+S2yync0OIRO9VZxyRdCOUNscKCuWLecjHbppszbOuhKCRIOqakqTBK/B GPDaPZT7j4Kiwo4EcN97C8+tRzT4OoXgghpKPAlY/ZaVIK8z+4CKMqb7YYsjVvvTK3U5 x6RKw3s4FhYXYaFa1iDndIgA6fjy1qP/k7qHrSOuhfXzMYj4kUYoQ+nhvf2BN4jp8tT0 GF/lbIfRFBg9bxfQfRXSo+0vbcLHR15mcNRMAsNBy7pqFS3e7Lz9vr/0qs2CupD52iRf hmUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=VIMgKLx654jhHRx4qIRTthK1ysjXXrrNqdoOVgSmOeE=; b=hW4ciOd0mAgERftp7goUi1MHCwjurhf9i/Pt7mP0R3qfL3eoj3N8KpCHrP8BjPczKL ozdIOH7DLX+axmwhhiX2fbdE2FwE4dLz9GrrLfZoRyZKeMMEzjCBIwusTN/vN5KeCYhg Dv+CJR+gEdM2eKxMUlHusXGvQJ6h7jOkNJ5JCIfau1bdDdneQeBYiKRSk4eu2ncgb73F 5BodgyJZWBFeXo8rZnVpwUI9MTf04SzQBiKedksSkSHcLFsUyKqt7aMXrd8qkHdsYxCw V7bnsdhWh2+z35AkSL3YEwKsgoAsHbVnxcCUXIbZ99RvgIimFw+Jwr76AoDXkuXahIEl cvAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@metaspace-dk.20221208.gappssmtp.com header.s=20221208 header.b=qU+Ug89i; 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 p4-20020a637404000000b005289dd0ef00si53577pgc.568.2023.05.04.11.54.06; Thu, 04 May 2023 11:54:18 -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=@metaspace-dk.20221208.gappssmtp.com header.s=20221208 header.b=qU+Ug89i; 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 S229915AbjEDS1T (ORCPT + 99 others); Thu, 4 May 2023 14:27:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbjEDS1R (ORCPT ); Thu, 4 May 2023 14:27:17 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C2D776AE for ; Thu, 4 May 2023 11:27:14 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-965a68abfd4so154745466b.2 for ; Thu, 04 May 2023 11:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=metaspace-dk.20221208.gappssmtp.com; s=20221208; t=1683224833; x=1685816833; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=VIMgKLx654jhHRx4qIRTthK1ysjXXrrNqdoOVgSmOeE=; b=qU+Ug89ilc6WN9TDAJzjO2f/60V8+1eXF/EYEp3lE+kxcCO8muY745qsFg4YsxdLhM GFFdVNRZ2FzIT711c0qNXBZAs2ZsygMEjKETMcJC0wwNakwNctVl1INHAPzh7fC1LrMM tsyDEWeNJvvUTUwdmwd0RVxd1f1JvD/Wjz4SlJ6JL3WtA3sYNzVrm6pWpQ0q70dMNaR/ HtvRLiiprdATGWlPxlk8i1r7DAaOmkgXfgl0Kk5tQAK1q5oMK7JWE4mGTEHSf7dh8bFa 8z7Eq1g2UFrwsaFNvu+DQNyVcJCNQnRbbFq6u8q1J6YbU3wb/U047orn+37qTQXJfP60 fMGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683224833; x=1685816833; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VIMgKLx654jhHRx4qIRTthK1ysjXXrrNqdoOVgSmOeE=; b=QrHYgbsPvrQtHecRXmy9AVNuJY5X/3sMFRP1v07pWbAV8f8j9YVgqifiKrC/Kr38jZ HPna+tbt5nXl7M94P5hUJip9gSFWjqnlB13/m4Qa/5/LsQebSUHPU/dBUyDxCFCVztNw 1Rrco4oxsFXlf350Z8TUYeO+yB8w0dDJT2iwtbHfZLHchdzRtljrmLLclm/JMKcIT4J5 mTruxE6pSKVpzhFE+fvIU6hJIYiEnUMGO24mGifO8N2ekXbp1njKfn8TXqmW4FepuTvU nYrdmxmlFtv7faWy0TkZq74JG93VU3LhUxU1Vx2TxAkzVyfidjCBtCH1jk1b40mPFmpJ LLLQ== X-Gm-Message-State: AC+VfDwYZQdKbBhwHUGKBoyPiKspA2nMonClrBWZ0XBfLbUGXvA/Uo9k appaNM4/putWZ6Gm9BizCeWgqg== X-Received: by 2002:a17:907:62aa:b0:961:a67:29c with SMTP id nd42-20020a17090762aa00b009610a67029cmr6647365ejc.70.1683224832922; Thu, 04 May 2023 11:27:12 -0700 (PDT) Received: from localhost ([79.142.230.34]) by smtp.gmail.com with ESMTPSA id li14-20020a170907198e00b009572db67bf2sm17304971ejc.89.2023.05.04.11.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 11:27:12 -0700 (PDT) References: <20230503090708.2524310-1-nmi@metaspace.dk> User-agent: mu4e 1.10.3; emacs 28.2.50 From: Andreas Hindborg To: Bart Van Assche 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, Matthew Wilcox , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?Q?Bj?= =?utf-8?Q?=C3=B6rn?= Roy Baron , Benno Lossin , open list , gost.dev@samsung.com Subject: Re: [RFC PATCH 00/11] Rust null block driver Date: Thu, 04 May 2023 20:15:23 +0200 In-reply-to: Message-ID: <87jzxot0jk.fsf@metaspace.dk> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Bart, Bart Van Assche writes: > On 5/3/23 02:06, Andreas Hindborg wrote: >> This is an early preview of a null block driver written in Rust. > > It is not clear to me why this effort was started? As far as I know the null_blk > driver is only used by kernel developers for testing kernel changes so end users > are not affected by bugs in this driver. Additionally, performance of this > driver is critical since this driver is used to measure block layer performance. > Does this mean that C is a better choice than Rust for this driver? I take it you did not read the rest of the cover letter. Let me quote some of it here: > A null block driver is a good opportunity to evaluate Rust bindings for the > block layer. It is a small and simple driver and thus should be simple to reason > about. Further, the null block driver is not usually deployed in production > environments. Thus, it should be fairly straight forward to review, and any > potential issues are not going to bring down any production workloads. > > Being small and simple, the null block driver is a good place to introduce the > Linux kernel storage community to Rust. This will help prepare the community for > future Rust projects and facilitate a better maintenance process for these > projects. > > The statistics presented in my previous message [1] show that the C null block > driver has had a significant amount of memory safety related problems in the > past. 41% of fixes merged for the C null block driver are fixes for memory > safety issues. This makes the null block driver a good candidate for rewriting > in Rust. In relation to performance, it turns out that there is not much of a difference. For memory safety bugs - I think we are better off without them, no matter if we are user facing or not. If it is still unclear to you why this effort was started, please do let me know and I shall try to clarify further :) Best regards, Andreas