From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4D1EC433F5 for ; Thu, 3 Feb 2022 20:58:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240971AbiBCU6h (ORCPT ); Thu, 3 Feb 2022 15:58:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:48109 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235763AbiBCU6h (ORCPT ); Thu, 3 Feb 2022 15:58:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643921916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AYBprK6Yoe2/EUwuhU7qvIGmdVdAlaSjpJ2H1aJGkRk=; b=IZBpOxT3841zYh9eBcygUXQTalr9CyPvuDfTlwVtCfbKIoAvnoMh7UdVsxBsCYHW6+291U NtsNNQEi5LyQxkDL9dMLVLIgdZyNfbk57pyNOAm9J12WwiA2hVG2Gk9cXIL+SuUy/FHFM1 DwbzyfyKx2mmukRIg7Tkv1vSc8WLc/g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-577-P1Eoj9VZNiO8RNAFIWFfjw-1; Thu, 03 Feb 2022 15:58:33 -0500 X-MC-Unique: P1Eoj9VZNiO8RNAFIWFfjw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5F80F1091DA2; Thu, 3 Feb 2022 20:58:30 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E196B61093; Thu, 3 Feb 2022 20:57:56 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id 213Kvu4n017456; Thu, 3 Feb 2022 15:57:56 -0500 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 213KvtMP017452; Thu, 3 Feb 2022 15:57:55 -0500 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Thu, 3 Feb 2022 15:57:55 -0500 (EST) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Luis Chamberlain cc: Christoph Hellwig , Keith Busch , Adam Manzanares , Vincent Fu , =?ISO-8859-15?Q?Javier_Gonz=E1lez?= , Chaitanya Kulkarni , "linux-block@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "dm-devel@redhat.com" , "linux-nvme@lists.infradead.org" , linux-fsdevel , Jens Axboe , "msnitzer@redhat.com >> msnitzer@redhat.com" , Bart Van Assche , "martin.petersen@oracle.com >> Martin K. Petersen" , "roland@purestorage.com" , Hannes Reinecke , "Frederick.Knight@netapp.com" , "zach.brown@ni.com" , "osandov@fb.com" , "lsf-pc@lists.linux-foundation.org" , "djwong@kernel.org" , "josef@toxicpanda.com" , "clm@fb.com" , "dsterba@suse.com" , "tytso@mit.edu" , "jack@suse.com" , Kanchan Joshi Subject: Re: [RFC PATCH 3/3] nvme: add the "debug" host driver In-Reply-To: Message-ID: References: <20220201102122.4okwj2gipjbvuyux@mpHalley-2> <20220202060154.GA120951@bgt-140510-bm01> <20220203160633.rdwovqoxlbr3nu5u@garbanzo> <20220203161534.GA15366@lst.de> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Thu, 3 Feb 2022, Luis Chamberlain wrote: > On Thu, Feb 03, 2022 at 05:15:34PM +0100, Christoph Hellwig wrote: > > On Thu, Feb 03, 2022 at 08:06:33AM -0800, Luis Chamberlain wrote: > > > On Wed, Feb 02, 2022 at 06:01:13AM +0000, Adam Manzanares wrote: > > > > BTW I think having the target code be able to implement simple copy without > > > > moving data over the fabric would be a great way of showing off the command. > > > > > > Do you mean this should be implemented instead as a fabrics backend > > > instead because fabrics already instantiates and creates a virtual > > > nvme device? And so this would mean less code? > > > > It would be a lot less code. In fact I don't think we need any new code > > at all. Just using nvme-loop on top of null_blk or brd should be all > > that is needed. > > Mikulas, > > That begs the question why add this instead of using null_blk with > nvme-loop? > > Luis I think that nvme-debug (the patch 3) doesn't have to be added to the kernel. Nvme-debug was an old student project that was canceled. I used it because it was very easy to add copy offload functionality to it - adding this capability took just one function with 43 lines of code (nvme_debug_copy). I don't know if someone is interested in continuing the development of nvme-debug. If yes, I can continue the development, if not, we can just drop it. Mikulas From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23176C433F5 for ; Thu, 3 Feb 2022 21:03:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643922228; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=o/K49AoXjLn7129IMviHFT46uBJPCvnSS+vKB2yo1oY=; b=I/EsOLh2txL9pe6qN1B0eakLK69hx2nOX8RjMNKAtO94NpVoEMygUcujHYUTvdLbICiJsI O3F9JCrgeoBvNq7u+dHfSj0EFOQ0RYy3jJcnC6KbInGOsChQlykTaVGcE341f/aEDRbvdN 4fUTzVmqpR08iRCndAxE9tRMe0t8X3Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-553-so9dA5YgMQGsu5yMT4nhOQ-1; Thu, 03 Feb 2022 16:03:44 -0500 X-MC-Unique: so9dA5YgMQGsu5yMT4nhOQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7BD20100C660; Thu, 3 Feb 2022 21:03:39 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 61FE44E2AB; Thu, 3 Feb 2022 21:03:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AC1934BB7C; Thu, 3 Feb 2022 21:03:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 213KwUQa014167 for ; Thu, 3 Feb 2022 15:58:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5CA9161095; Thu, 3 Feb 2022 20:58:30 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E196B61093; Thu, 3 Feb 2022 20:57:56 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id 213Kvu4n017456; Thu, 3 Feb 2022 15:57:56 -0500 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 213KvtMP017452; Thu, 3 Feb 2022 15:57:55 -0500 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Thu, 3 Feb 2022 15:57:55 -0500 (EST) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Luis Chamberlain In-Reply-To: Message-ID: References: <20220201102122.4okwj2gipjbvuyux@mpHalley-2> <20220202060154.GA120951@bgt-140510-bm01> <20220203160633.rdwovqoxlbr3nu5u@garbanzo> <20220203161534.GA15366@lst.de> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: dm-devel@redhat.com Cc: Vincent Fu , "djwong@kernel.org" , "linux-nvme@lists.infradead.org" , "clm@fb.com" , "dm-devel@redhat.com" , Adam Manzanares , "osandov@fb.com" , =?ISO-8859-15?Q?Javier_Gonz=E1lez?= , Bart Van Assche , "linux-scsi@vger.kernel.org" , Christoph Hellwig , "roland@purestorage.com" , "zach.brown@ni.com" , Chaitanya Kulkarni , "msnitzer@redhat.com >> msnitzer@redhat.com" , "josef@toxicpanda.com" , "linux-block@vger.kernel.org" , "dsterba@suse.com" , Keith Busch , "Frederick.Knight@netapp.com" , Jens Axboe , "tytso@mit.edu" , Kanchan Joshi , "martin.petersen@oracle.com >> Martin K. Petersen" , "jack@suse.com" , linux-fsdevel , "lsf-pc@lists.linux-foundation.org" Subject: Re: [dm-devel] [RFC PATCH 3/3] nvme: add the "debug" host driver X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, 3 Feb 2022, Luis Chamberlain wrote: > On Thu, Feb 03, 2022 at 05:15:34PM +0100, Christoph Hellwig wrote: > > On Thu, Feb 03, 2022 at 08:06:33AM -0800, Luis Chamberlain wrote: > > > On Wed, Feb 02, 2022 at 06:01:13AM +0000, Adam Manzanares wrote: > > > > BTW I think having the target code be able to implement simple copy without > > > > moving data over the fabric would be a great way of showing off the command. > > > > > > Do you mean this should be implemented instead as a fabrics backend > > > instead because fabrics already instantiates and creates a virtual > > > nvme device? And so this would mean less code? > > > > It would be a lot less code. In fact I don't think we need any new code > > at all. Just using nvme-loop on top of null_blk or brd should be all > > that is needed. > > Mikulas, > > That begs the question why add this instead of using null_blk with > nvme-loop? > > Luis I think that nvme-debug (the patch 3) doesn't have to be added to the kernel. Nvme-debug was an old student project that was canceled. I used it because it was very easy to add copy offload functionality to it - adding this capability took just one function with 43 lines of code (nvme_debug_copy). I don't know if someone is interested in continuing the development of nvme-debug. If yes, I can continue the development, if not, we can just drop it. Mikulas -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel