Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1016317pxb; Thu, 17 Feb 2022 21:38:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYV/816/tAdCHjssYmLzPL15Ins7ZQYAea2XEauwIhK+m+zBI9a07WhujrUPj5Bmrc+Ws+ X-Received: by 2002:a17:907:9086:b0:6b3:fce8:50ee with SMTP id ge6-20020a170907908600b006b3fce850eemr5045445ejb.390.1645162730464; Thu, 17 Feb 2022 21:38:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645162730; cv=none; d=google.com; s=arc-20160816; b=BgQD83tu3sUZIrLrDvP/2j1EFvjJZcj0lrTuFNRLsru/rXa4/AnK0xm+7555Kh0rdM 5hJpQnpt41RHrjBVKaCJsDxtlhp3tIlsPEsvYDhztUKfH6mPOhT3+/UBDeUkZh/ekAM7 CxRtvMRDV1XkcvjycRPcMg+coGoA1IpoODDY6P1dWV8SSK1pWQj57IIzglpD5h2Vl50S x9Kuz339eFRdZ/cP00/nY4dv5w2hVvidRLl4wQcSsI8HjAmPpzgpE0OkspqdEYpJ7L38 exrzSpY8gGeS1ig5SK92JAbKEYMZd/94FvzVDS10rKIUna9UqQr4FJtxRARdhPDFiUMc UbJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:user-agent :in-reply-to:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=ynd2eDxDUnwe6F3ojujuTTawvN0c+2nk4kTWnIu/dlQ=; b=XxQdxHdrN7dVNJn6e7G+7UwND+HqWuj5Vp/uNDEVUcii8lde9f6ebDkdFlL6A83KB+ znwn7PwOEEzKC8xkVx2GevNnLfsrkuw+z4QslY1JOLPoaDOvxYX1q5ToCrEESBDtPyAF xGwzcU45naePt79Slzndke+wn6l7LKuhIQBJsSEzr1WzRKm0GMNiBk1dRhszRzoLORim HByO2VxJcFB2ppA0m4dd/oN0eQZQVVwi3AkdjBsxVxytW4h6UK2DOrT4mSCzACgbGjCT zl2T2HrI1e2Sgj3+TxO5MDGs5YMU+hXucmqQkSQhD0zG137tKeiJN4QAORMP31ncXAu0 Kptg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=preDF4sd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r6si4683345edd.252.2022.02.17.21.38.27; Thu, 17 Feb 2022 21:38:50 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b=preDF4sd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229971AbiBRFBn (ORCPT + 99 others); Fri, 18 Feb 2022 00:01:43 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbiBRFBO (ORCPT ); Fri, 18 Feb 2022 00:01:14 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCE742BC05E; Thu, 17 Feb 2022 21:00:46 -0800 (PST) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220218050045epoutp02c83876128818ae25395bb57d6abea6ff~UyLWH7WAW2920729207epoutp02i; Fri, 18 Feb 2022 05:00:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220218050045epoutp02c83876128818ae25395bb57d6abea6ff~UyLWH7WAW2920729207epoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1645160445; bh=ynd2eDxDUnwe6F3ojujuTTawvN0c+2nk4kTWnIu/dlQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=preDF4sdme9KivomaANav12YBXH4hmpjkSNO7FcMAzUz+tLDV5JQJS6dGzJJWfquo RbFkKbnV/2WEXiYegV011cUym40GHA211szifeEdkVdyscKykI+ZKnt4nAKChHd+zx yLcoVcp1GLCo9WeisnN+u5wLzWsu+oguD89b3ICA= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20220218050045epcas5p268ef3f00ae6635c8035d5bfbcb14a2ca~UyLVV-p3W2406724067epcas5p2u; Fri, 18 Feb 2022 05:00:45 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.181]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4K0KJl21lBz4x9Q0; Fri, 18 Feb 2022 05:00:39 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id B5.F7.05590.6F72F026; Fri, 18 Feb 2022 14:00:38 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20220217130715epcas5p2159ed983a5d32b04709d44b6c155e12e~UlK08gd8s1495614956epcas5p22; Thu, 17 Feb 2022 13:07:15 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220217130715epsmtrp106f09d07c77a34cb19ee343b972efdf0~UlK06Jz2_1226812268epsmtrp17; Thu, 17 Feb 2022 13:07:15 +0000 (GMT) X-AuditID: b6c32a4b-739ff700000015d6-47-620f27f65a47 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 2E.9C.29871.3884E026; Thu, 17 Feb 2022 22:07:15 +0900 (KST) Received: from test-zns (unknown [107.110.206.5]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220217130710epsmtip197f0af2b21b2d267e9a7e52f7935cd7f~UlKwioze70271602716epsmtip1S; Thu, 17 Feb 2022 13:07:10 +0000 (GMT) Date: Thu, 17 Feb 2022 18:32:15 +0530 From: Nitesh Shetty To: Dave Chinner Cc: javier@javigon.com, chaitanyak@nvidia.com, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, dm-devel@redhat.com, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org, axboe@kernel.dk, msnitzer@redhat.com, bvanassche@acm.org, martin.petersen@oracle.com, hare@suse.de, kbusch@kernel.org, hch@lst.de, Frederick.Knight@netapp.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, joshi.k@samsung.com, arnav.dawn@samsung.com, nitheshshetty@gmail.com, Alasdair Kergon , Mike Snitzer , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Alexander Viro , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 00/10] Add Copy offload support Message-ID: <20220217130215.GB3781@test-zns> MIME-Version: 1.0 In-Reply-To: <20220214220741.GB2872883@dread.disaster.area> User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA01TazBcZxjOd87u2SWDY4N8NJnoarUi2A22n7hURmpOKz+0mWmnmWRYnMFg d7NLJG1nECJFZZE20ZXEJVpxGUow29hNGopx60qFEreoS9OktUik7mr3SJt/z/vM87zXebk4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AMASEMYn6TUJGn1MUoyWPxqlV2r0KdqEqH2JGjuYeajVEQ5QUzIc 5QIUC1wAsbR8gXS4URovk+5XHkvjdYl7dClqXu8CS1goD5W2Gb17ZFyCMpn/mueTeN1/LcUG LU6njNvj+zdPTBQNHF6na4UZ9+9mRNxzhi4M39f5vsL/WhMUe2ADyQPBKvuxdhu7LVbkq+1U FaYyb6+QbX8tLSzsdQtx608vOjW0dliRVtP+RtWmUNtK1Hwo4vO1ruzN0ugV1w9rLkFT7lGb IsP9YUOzYF+6xQCfKKfd1orLR+rOFCAh2nr73PJImbDoq7hlVZWSgo4WPmM0e+TViGndlm+o 6vxPIqU5936zfXRix+7auNHg/KKuVMTxseFrvoh4JGRt/SvNc7K8wvRlze6rzDuDEzuyVIK2 0dPRkBiSefNkZdmt+VA94HnWIg62Jm+EndvU4zmPLGd3ugbCPoPVN8o/lkP9QWXMalqnV/4N ksnh0b8DAAA= X-CMS-MailID: 20220217130715epcas5p2159ed983a5d32b04709d44b6c155e12e X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----7Im1L.vKorTl163deO4rxYDAHxkziUWsBhtki-3JrW1s26Hg=_8dd40_" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220214080551epcas5p201d4d85e9d66077f97585bb3c64517c0 References: <20220214080002.18381-1-nj.shetty@samsung.com> <20220214220741.GB2872883@dread.disaster.area> X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,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 ------7Im1L.vKorTl163deO4rxYDAHxkziUWsBhtki-3JrW1s26Hg=_8dd40_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline Tue, Feb 15, 2022 at 09:08:12AM +1100, Dave Chinner wrote: > On Mon, Feb 14, 2022 at 01:29:50PM +0530, Nitesh Shetty wrote: > > The patch series covers the points discussed in November 2021 virtual call > > [LSF/MM/BFP TOPIC] Storage: Copy Offload[0]. > > We have covered the Initial agreed requirements in this patchset. > > Patchset borrows Mikulas's token based approach for 2 bdev > > implementation. > > > > Overall series supports – > > > > 1. Driver > > - NVMe Copy command (single NS), including support in nvme-target (for > > block and file backend) > > > > 2. Block layer > > - Block-generic copy (REQ_COPY flag), with interface accommodating > > two block-devs, and multi-source/destination interface > > - Emulation, when offload is natively absent > > - dm-linear support (for cases not requiring split) > > > > 3. User-interface > > - new ioctl > > > > 4. In-kernel user > > - dm-kcopyd > > The biggest missing piece - and arguably the single most useful > piece of this functionality for users - is hooking this up to the > copy_file_range() syscall so that user file copies can be offloaded > to the hardware efficiently. > > This seems like it would relatively easy to do with an fs/iomap iter > loop that maps src + dst file ranges and issues block copy offload > commands on the extents. We already do similar "read from source, > write to destination" operations in iomap, so it's not a huge > stretch to extent the iomap interfaces to provide an copy offload > mechanism using this infrastructure. > > Also, hooking this up to copy-file-range() will also get you > immediate data integrity testing right down to the hardware via fsx > in fstests - it uses copy_file_range() as one of it's operations and > it will find all the off-by-one failures in both the linux IO stack > implementation and the hardware itself. > > And, in reality, I wouldn't trust a block copy offload mechanism > until it is integrated with filesystems, the page cache and has > solid end-to-end data integrity testing available to shake out all > the bugs that will inevitably exist in this stack.... > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com > We had planned copy_file_range (CFR) in next phase of copy offload patch series. Thinking that we will get to CFR when everything else is robust. But if that is needed to make things robust, will start looking into that. -- Nitesh Shetty ------7Im1L.vKorTl163deO4rxYDAHxkziUWsBhtki-3JrW1s26Hg=_8dd40_ Content-Type: text/plain; charset="utf-8" ------7Im1L.vKorTl163deO4rxYDAHxkziUWsBhtki-3JrW1s26Hg=_8dd40_--