Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp989271pxv; Thu, 22 Jul 2021 18:20:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7MVnzNp4LrUap4h2gdkBgB612H5fyRNcf3+zyW85MfLkcEptRzbaj9PlBkGLl14l9yIZD X-Received: by 2002:a17:906:edd2:: with SMTP id sb18mr2503025ejb.82.1627003250307; Thu, 22 Jul 2021 18:20:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627003250; cv=none; d=google.com; s=arc-20160816; b=gpxipVeg7FT1GUXpnpK2bag2aIDoYjVBlx+Vq5qzREvPHOkbgJcaQt7bkRzOfrwUSx Zu0z1luG5YiiO2mFf79Euy6GdYq7bZKj5BEN/HzSqlU9kQbYln0o9p/PqhbxvShY8Xu7 ntra5ORoJYfOO1JlPPp/6IDMlzkIpP2f/7u+m2tcffEsj0jX5Pgda3NFn11YV2XV1NW7 /53UjS4J3igJ+WjqlXwo9jiAFsNaTD3s6tlJuv5iBNrGiqYBZem4XMIxhOTCzM00m4Am GgNumB4/y4PzfdnnSF/U6MPTXSySMG+yQldeC85Y94Mx6ajOht9NBdsO6QBWd0ht5RRO nioA== 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=WwS1LaIGUIRtAl4RX67oXHqtnkZGSLpu40O95p0Ahlc=; b=vXdouTzwgLWtYhJMWtts3rHTjNWulCIWS+YG2Ys/pqMTOVgVmFZV4O3pDW7UHE6Xn2 brayZQ5ZaVUujMPh/64RM14FJn0wLThRXWljXEOJ7uYz/UE6D6MBI34nIMMdqArFg/kB qi4LrbfzJyWpbvTpPHeQZxVTG8QGehv62JTOtSDIfuRDYbtzcRQzU+Dv6kZtt3UlVwvi u8Ps5D9QrAe+OnbObCMu7CwCiaRaFKat/tqau8eLvAHvZNt5gsiEANdUgewQbM22A3fg L1+IV6DY3dn8dgvM24JHS0gGN5CQkXUx+Mbfn0m7K39V+g9v8koURdKJfAj3OkvynBuy 1gpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iY3hsy88; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si31477613ejl.743.2021.07.22.18.20.26; Thu, 22 Jul 2021 18:20:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iY3hsy88; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232993AbhGWAiA (ORCPT + 99 others); Thu, 22 Jul 2021 20:38:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232905AbhGWAh7 (ORCPT ); Thu, 22 Jul 2021 20:37:59 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07AD9C061575; Thu, 22 Jul 2021 18:18:33 -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=WwS1LaIGUIRtAl4RX67oXHqtnkZGSLpu40O95p0Ahlc=; b=iY3hsy88NC4WR6KINmTuScd3nJ 1Nb7Qa1yP11v42t/Abvtl485R53ZB2n8oWQTs//xGmQes7f7lcZUlEDfws94kcynhRmmP1dMf1Rb5 1Zn2i0P5tX/mDRzG0/Hi9FIOCK8+Iw675WzBKez81GOjauxj1Wpec1qkQtQjbmrDr808qEMzDMuRY E585Ywv9zpJXw8uJ5vsSg1Wnn19z9cLA2iV42VRhtHfRls6JKb+FO+Popo4FUA+rEkf6bhZmbG9FH Q7H7630hzuBmDbHh1meQSLtkNJvRvtzVowEYkooMTiXbJL7CVA+asYcZxL5NHMnPCK7scqtxBy4/i DQmSKXLA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6jp9-00AsRo-1G; Fri, 23 Jul 2021 01:18:03 +0000 Date: Fri, 23 Jul 2021 02:17:58 +0100 From: Matthew Wilcox To: Wedson Almeida Filho Cc: Finn Behrens , Greg Kroah-Hartman , Miguel Ojeda , Christoph Hellwig , Miguel Ojeda , Linus Torvalds , rust-for-linux , Linux Kbuild mailing list , Linux Doc Mailing List , linux-kernel Subject: Re: [PATCH 00/17] Rust support Message-ID: References: <20210704202756.29107-1-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 11:55:58PM +0100, Wedson Almeida Filho wrote: > Hey Matthew, > > On Thu, Jul 08, 2021 at 01:58:32AM +0100, Matthew Wilcox wrote: > > Why are you so resistant to writing a real driver that deals with actual > > hardware? > > I don't think it was so much resistance but rather a prioritisation thing. Have > you by any chance seen the gpio driver I posted a couple of days ago? I haven't seen it, no ... > > A simple NVMe driver is less than a thousand lines of C. > > I know the one in the kernel now is ridiculously complicated and has > > been thoroughly messed up with abstractions to support NVMeoF instead > > of having a separate driver, but it's really a simple interface at heart. > > The latest NVMe spec is 452 pages long, which seems to contradict your claim > that it's simple. As I said, they've put all kinds of crap into NVMe these days. If you look at the 1.0e spec, it's 127 pages. > In any case, translating less than 1K lines of C shouldn't be > too hard (after I've built the abstractions, of course). Would you mind sharing > the simple driver you mention above? Unfortunately, most of the early versions were lost during the kernel.org breakin. If you check out commit 5da273fe3fd1 and look at drivers/block/nvme.c, you'll see a driver that's about 2000 lines.