Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp199804pxb; Fri, 9 Apr 2021 23:38:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5U0NJQPr+A1XMqVfeWC4FLv9jrYB6CVlhy/iHO/dBE2nx0NTfr7e0xTUsf5sRX8gILF5R X-Received: by 2002:a17:906:7016:: with SMTP id n22mr9766106ejj.23.1618036735894; Fri, 09 Apr 2021 23:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618036735; cv=none; d=google.com; s=arc-20160816; b=oCeotRAeOpabkbzOXHBt5ehbpzAsiYlJZNKN/vsTwksSaDNY1jfQ0o4UFiL6wge0ZS ctp0LkWZor/Dg5e87X/cSN75PuCcZ940mxvzuMLxnBjVu5ufjcl6WuO6FZp6jRNxQJ6Q A79brEU1DMphXm+p1zadfYo/ifGOBD3eE9LP8254/UiZhrHwcx2rcRT/2pYxrvhkh0OL DZXYpkEXNmG96SjFA69r6vsIRK3vLuoIXARRSk821eGMjwmHIKOP5x7pZTYv/e67cnhw Zql0qQbBJUqXHCLTxrJHSFN0xU/RUV9eds82+g5EFW7LxxTTTSiSEJYU6QcFCnNf7rxN 4wMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:cc:references:message-id:date :subject:mime-version:from:content-transfer-encoding:dkim-signature; bh=QmBA/khm9QQj8QSTpq8GUmMDxfR3EYkN2ltUuGJAbWQ=; b=DF4KqFRsfWxup2muz8zH4DZkd4Tegk+nnUug1PpA2OzKO5ejOkzJ51GiOka1YED25A lVJn1gYkl3vO5WMzyKo2zgHWA9//rqbd7H/Pmn/y82tMoZvPtHcAZckXoiFWhwBZIaHh 2kpyIgX6ngiW9DNQTW703HahtG+TUeym7/BsuWdRb24aU+owBxUoPXDRzvwRfgZHjHgG n/Ybu8ZVwCRSc8iFJMZ/76kSTPf+DYtnVkuWdiiGqYqS9U1TmN9bkNUnYaQFeCNj0/pJ zcPuFoCaQA3YfqXJ57VZmtaOaoe04EzqWvBEPHuAxdIb1ZtWfe4j1KYLbswTE7EmEKI7 KaKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b=sYihbTj0; 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 v7si3901677edr.1.2021.04.09.23.38.29; Fri, 09 Apr 2021 23:38:55 -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=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b=sYihbTj0; 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 S234370AbhDJGdP (ORCPT + 99 others); Sat, 10 Apr 2021 02:33:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233606AbhDJGdN (ORCPT ); Sat, 10 Apr 2021 02:33:13 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A2FCC061764 for ; Fri, 9 Apr 2021 23:32:59 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id sd23so3292961ejb.12 for ; Fri, 09 Apr 2021 23:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=javigon-com.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=QmBA/khm9QQj8QSTpq8GUmMDxfR3EYkN2ltUuGJAbWQ=; b=sYihbTj0ySH56E1/o08bUwUHP6PyMBpmkgNghaJfVEKAxJr6SwXUAXRRgAbBC/Bzs6 XCmi+fNGzSELeEOU9OyM5gKWSCuhiaTBo8xg5JOR1Xx5YhMEyV5UoZRlzGvOCBFxfdnb Y4XuBjJrymTHqG4Q9c4L/6mmF0Y28mUwbQA1Pievd7aBVzSEiSirgpM/5BDL+f3GB6hH akcyRLY3HEflOUB++qOGJgYxTP9/zppRBr6LWHBQooOIim3A4sdddrOCduKHbzLbGxCf Y8xxy+DyzLOE1m84KcHyUnaOjgn3AqxfX4rVJEXqpze20A3tB7uDXjDBDbGYmlx2eivb nPIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=QmBA/khm9QQj8QSTpq8GUmMDxfR3EYkN2ltUuGJAbWQ=; b=US41hQCZ7uMPji9MU4vpHcwe62sJkRRlhmJ4gHyXFTaGcRKFZFI+QR+7IopS7R+cGB sFVuiHCugWN8VbFBkcjn/yvGO7duXSKUC7QGZg1Ifjvu/vK9VN1czNqTDK7aySJtWRhT fYsHUONhwwfIxURlQUa3nc6eLCfsyxBl5HNkYVVM17cEnv7uvUtBBk0ucW5GU9RalE00 QdVUV6+YRlDVVC26OppKtj1bbKJUe+65iXS6EF74vyys/WuaSm1lWyFqYYBDoyCetYyT zuIELiKoyXqNRH5N23W4o3Br2PX2hbaidmHkIvEIsyzmIFreWdtnTAKGq5R5Kv1TdCKW izCA== X-Gm-Message-State: AOAM5328bM65hXg9Q9OzKNUkFxLr/5pOr0TwtNGMDUb0IafohBAuc8AR 3YgkSrU2qGTCRiZc7K6zeiQ0oA== X-Received: by 2002:a17:906:1d0e:: with SMTP id n14mr19377458ejh.97.1618036378037; Fri, 09 Apr 2021 23:32:58 -0700 (PDT) Received: from [192.168.10.20] (5.186.124.214.cgn.fibianet.dk. [5.186.124.214]) by smtp.gmail.com with ESMTPSA id ck29sm2558898edb.47.2021.04.09.23.32.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Apr 2021 23:32:57 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: =?utf-8?Q?Javier_Gonz=C3=A1lez?= Mime-Version: 1.0 (1.0) Subject: Re: [RFC PATCH v5 0/4] add simple copy support Date: Sat, 10 Apr 2021 08:32:56 +0200 Message-Id: <5BE5E1D9-675F-4122-A845-B0A29BB74447@javigon.com> References: Cc: Max Gurtovoy , SelvaKumar S , linux-nvme@lists.infradead.org, axboe@kernel.dk, Damien Le Moal , kch@kernel.org, sagi@grimberg.me, snitzer@redhat.com, selvajove@gmail.com, linux-kernel@vger.kernel.org, nj.shetty@samsung.com, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, joshi.k@samsung.com, javier.gonz@samsung.com, kbusch@kernel.org, joshiiitr@gmail.com, hch@lst.de In-Reply-To: To: Chaitanya Kulkarni X-Mailer: iPhone Mail (18D70) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 10 Apr 2021, at 02.30, Chaitanya Kulkarni w= rote: >=20 > =EF=BB=BFOn 4/9/21 17:22, Max Gurtovoy wrote: >>> On 2/19/2021 2:45 PM, SelvaKumar S wrote: >>> This patchset tries to add support for TP4065a ("Simple Copy Command"), >>> v2020.05.04 ("Ratified") >>>=20 >>> The Specification can be found in following link. >>> https://nvmexpress.org/wp-content/uploads/NVM-Express-1.4-Ratified-TPs-1= .zip >>>=20 >>> Simple copy command is a copy offloading operation and is used to copy >>> multiple contiguous ranges (source_ranges) of LBA's to a single destinat= ion >>> LBA within the device reducing traffic between host and device. >>>=20 >>> 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. >>>=20 >>> *blkdev_issue_copy* takes source bdev, no of sources, array of source >>> ranges (in sectors), destination bdev and destination offset(in sectors)= . >>> If both source and destination block devices are same and copy_offload =3D= 1, >>> then copy is done through native copy offloading. Copy emulation is used= >>> in other cases. >>>=20 >>> As SCSI XCOPY can take two different block devices and no of source rang= e is >>> equal to 1, this interface can be extended in future to support SCSI XCO= PY. >> Any idea why this TP wasn't designed for copy offload between 2=20 >> different namespaces in the same controller ? >=20 > Yes, it was the first attempt so to keep it simple. >=20 > Further work is needed to add incremental TP so that we can also do a copy= > between the name-spaces of same controller (if we can't already) and to th= e > namespaces that belongs to the different controller. >=20 >> And a simple copy will be the case where the src_nsid =3D=3D dst_nsid ? >>=20 >> Also why there are multiple source ranges and only one dst range ? We=20 >> could add a bit to indicate if this range is src or dst.. One of the target use cases was ZNS in order to avoid fabric transfers durin= g host GC. You can see how this plays well with several zone ranges and a si= ngle zone destination.=20 If we start getting support in Linux through the different past copy offload= efforts, I=E2=80=99m sure we can extend this TP in the future.=20