Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1221838pxb; Sun, 21 Feb 2021 16:52:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxL7g5uCP3fwvzM1OEOxolM5vjQd4R7NkpYlCNPjkN4GekcScUv5O34sVKDIGFEwSHdBhKv X-Received: by 2002:a17:906:fb14:: with SMTP id lz20mr18765082ejb.391.1613955130740; Sun, 21 Feb 2021 16:52:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613955130; cv=none; d=google.com; s=arc-20160816; b=N9RIRug9Ousl42FIbtFu4YQFnRsWCck7+gaijQnFLyDj5Hw7sDlc3CmXcgKMYfBoIM GqCXgEhCdVn8Jhh+tQacT29gdDpicgtdO7s2+m+ftJiG9k8GFmBhr06xnIVmT+GnMgwB gTEDNUyeXKD4DmItDcjXGA3rAF9F2u8CHpJWvEw+1kNbF9AWiyqMRsbFkIdIdRY93ygf eBQN1LUxDrMs8bvB6udTi5NbmaFVc3kqyLOPUC/+s3tAu37P0mlYAI1bYJPmO4iqBfIE aiZg+Naw30VA/GTrQWHy9yPtfFWaIcDO1DgssWoRrSdTvYfbWoxfRPUJ9jR9k20uRwHw OLDQ== 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; bh=cig9ik+je0Mc38ac69fRH5tL49YWZMZ/KMjOuIvB5uU=; b=0lGxDe3rnNA+vEInJLXhvgBkwte4unxaqiKn9j9d3+jfxfq3do49I61Lr+XwgwvH5h ncFg+LX1e7cgyL1urkrYEfoWtydOkqGp70ZlziaaRQZXZdUXgURbntKmz8+yTVQJ9mzZ BLHSKeOLCb3t68d4Zi2gSgWdekQf/7EhbSIsPbbHx3JN1U2xfr1WwDqzVj/qxKefr3KJ jVyCmjJawi29y2Vo5HE6MICuf3LcA4nH/NTy8ZVd0dR9wDgzJxHKQi+0iiaiwuNlQhhE wrJWaFGy7kEdcmaFLxaRPGRs70kL/uSpZdwQ39BcvsTMC0IZw4csxKuM9A9Z/PcpHKl9 cxSg== ARC-Authentication-Results: i=1; mx.google.com; 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 o9si10791694edw.190.2021.02.21.16.51.48; Sun, 21 Feb 2021 16:52:10 -0800 (PST) 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; 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 S229952AbhBUXxg (ORCPT + 99 others); Sun, 21 Feb 2021 18:53:36 -0500 Received: from mail108.syd.optusnet.com.au ([211.29.132.59]:38331 "EHLO mail108.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbhBUXxf (ORCPT ); Sun, 21 Feb 2021 18:53:35 -0500 Received: from dread.disaster.area (pa49-179-130-210.pa.nsw.optusnet.com.au [49.179.130.210]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 7E7221ADB51; Mon, 22 Feb 2021 10:52:49 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1lDyWu-00Fq01-QV; Mon, 22 Feb 2021 10:52:48 +1100 Date: Mon, 22 Feb 2021 10:52:48 +1100 From: Dave Chinner To: SelvaKumar S Cc: linux-nvme@lists.infradead.org, kbusch@kernel.org, axboe@kernel.dk, damien.lemoal@wdc.com, hch@lst.de, sagi@grimberg.me, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com, snitzer@redhat.com, selvajove@gmail.com, joshiiitr@gmail.com, nj.shetty@samsung.com, joshi.k@samsung.com, javier.gonz@samsung.com, kch@kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH v5 0/4] add simple copy support Message-ID: <20210221235248.GZ4626@dread.disaster.area> References: <20210219124517.79359-1-selvakuma.s1@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210219124517.79359-1-selvakuma.s1@samsung.com> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=YKPhNiOx c=1 sm=1 tr=0 cx=a_idp_d a=JD06eNgDs9tuHP7JIKoLzw==:117 a=JD06eNgDs9tuHP7JIKoLzw==:17 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=pNaSbsGRAAAA:8 a=7-415B0cAAAA:8 a=bdcsEvdjF_AAMq5uHxAA:9 a=CjuIK1q_8ugA:10 a=k8uaQqolKd8A:10 a=cz0TccRYsqG1oLvFGeGV:22 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 19, 2021 at 06:15:13PM +0530, SelvaKumar S wrote: > This patchset tries to add support for TP4065a ("Simple Copy Command"), > v2020.05.04 ("Ratified") > > The Specification can be found in following link. > https://nvmexpress.org/wp-content/uploads/NVM-Express-1.4-Ratified-TPs-1.zip > > Simple copy command is a copy offloading operation and is used to copy > multiple contiguous ranges (source_ranges) of LBA's to a single destination > LBA within the device reducing traffic between host and device. > > This implementation doesn't add native copy offload support for stacked > devices rather copy offload is done through emulation. Possible use > cases are F2FS gc and BTRFS relocation/balance. It sounds like you are missing the most obvious use case for this: hooking up filesystem copy_file_range() implementations to allow userspace to offload user data copies to hardware.... Another fs level feature that could use this for hardware acceleration fallocate(FALLOC_FL_UNSHARE). These are probably going to be far easier to hook up than filesystem GC algorithms, and there is also solid data integrity and stress testing checking infrastructure for these operations via fstests. > As SCSI XCOPY can take two different block devices and no of source range is > equal to 1, this interface can be extended in future to support SCSI XCOPY. That greatly complicates the implementation. do we even care at this point about cross-device XCOPY at this point? Cheers, Dave. -- Dave Chinner david@fromorbit.com