Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34933647rwd; Sun, 9 Jul 2023 23:33:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlEucu5ummUiaxzmvuJMuL++gBUnRgFiQh0J+EEFYzJ6N0Kqyjr4febfIzXx/xvaO7F9a8hw X-Received: by 2002:a17:907:587:b0:988:e365:6231 with SMTP id vw7-20020a170907058700b00988e3656231mr9370637ejb.41.1688970822340; Sun, 09 Jul 2023 23:33:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688970822; cv=none; d=google.com; s=arc-20160816; b=GpY5smRvFhHdVyY0Y2quIfs/wUwfld4c0D66ra8Yp6nXzX0KTOpsD4/kPfwgNmiacH HlV7P8MnpsS6TkzIgQG/AcqlQ6xUwKwuPgTT7BppOsyBwdiXaaChrjN6Snw/21pP5KGx i4cLttSuEVJ8Tgu/eo/EP7GZcQ8FP7aXOA7o8JLOxKbElxYj2FDcuGWJM9J0DL4JRRcC jXD6yQsoRUKVc0unKfgKTG6+ZyJGDTeeUXoycHFhbQvUx+p960CzyQp3+VCUvo6lPgoo DsKq7oiK+bvvh+GF8XtLEPByY33nZjNUkQjT+9bvCTNfHaOiHHi4NfQ5wHtoCb3+UKUT mZUA== 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=AkcllTXaBBgTvGpp8T6MAgMy3lqiAkEaH53w0AU+zOk=; fh=iqcwd1cIwmuOabvv0s4nonB+X8DwhdLvfoWV7PpJr1E=; b=GqHEMge+Zb2rusBg9kUBgd3MfZi2xBhDFKsA9TR3hlcoDA9QXYGsl2f+kD9HbkFfrt CAp5WpwEaL1+IeORhOcdiw/OgCymdEFK2yw9+YGrAwMokzoEMnemNStVHV7O7PNiTCIN sxN8Tgu1iT9wVJYIw3TeH9+OuDbWBcmJkKEs0e+BMJWhcDkE9l3MkUDxCBgd0+l/Tuok DMx+ikHOJX+bIno+oh4wZ7iRKbp7UH/TiOEWQqCymBF+eWAunizvir7flA+CqCKgxDL2 cdbl+Vey9v8xwz7eOuQCRyn2g7J81vRFmjJOS4n7Ibj3v97WggteYKeo6qsmk37syc9F xYUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=aCqCm77v; 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 jp10-20020a170906f74a00b009929eee322dsi8579283ejb.180.2023.07.09.23.33.18; Sun, 09 Jul 2023 23:33:42 -0700 (PDT) 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=aCqCm77v; 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 S229936AbjGJG3b (ORCPT + 99 others); Mon, 10 Jul 2023 02:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231264AbjGJG3G (ORCPT ); Mon, 10 Jul 2023 02:29:06 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73F8419A for ; Sun, 9 Jul 2023 23:29:00 -0700 (PDT) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230710062857epoutp02a4965b0c79926c9de296f045c26a5684~wbcFQnZ981900719007epoutp02g for ; Mon, 10 Jul 2023 06:28:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230710062857epoutp02a4965b0c79926c9de296f045c26a5684~wbcFQnZ981900719007epoutp02g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1688970537; bh=AkcllTXaBBgTvGpp8T6MAgMy3lqiAkEaH53w0AU+zOk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aCqCm77vnKI3Sb57gV/tORBkqAOp27/tq1AorR3CCq0AtsstcywQEM5Ndi1mpwPRf MutVwrUedylonUAtm7CfSA0eU1QcXI3YOPxuuQ8+8wC4Mbh64Aiz+VShTEGkdcB+aQ kx7HFu+fpiQ+mMHdyNCXJ3kX4yFBcERdcozsdAUU= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20230710062856epcas5p2880af543580e2063d281acd332e97161~wbcEompir0427004270epcas5p2q; Mon, 10 Jul 2023 06:28:56 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.175]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4QzvGb2Td5z4x9Q7; Mon, 10 Jul 2023 06:28:55 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id AE.14.44250.725ABA46; Mon, 10 Jul 2023 15:28:55 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20230710061719epcas5p36b7be425517b0b09d73540b18fc17748~wbR7vCBu91195211952epcas5p3V; Mon, 10 Jul 2023 06:17:19 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230710061719epsmtrp1bebd27292cfbc5654c3251e1e80611db~wbR7t2fVC1310913109epsmtrp1d; Mon, 10 Jul 2023 06:17:19 +0000 (GMT) X-AuditID: b6c32a4a-ec1fd7000000acda-96-64aba52792cd Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 86.2E.64355.F62ABA46; Mon, 10 Jul 2023 15:17:19 +0900 (KST) Received: from green245 (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230710061715epsmtip1965f1b463cf314395eb9ac24b4926cc0~wbR3v5VNB2634026340epsmtip1p; Mon, 10 Jul 2023 06:17:15 +0000 (GMT) Date: Mon, 10 Jul 2023 11:44:01 +0530 From: Nitesh Shetty To: Christoph Hellwig Cc: "Martin K. Petersen" , Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , Christoph Hellwig , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , linux-scsi@vger.kernel.org, willy@infradead.org, hare@suse.de, djwong@kernel.org, bvanassche@acm.org, ming.lei@redhat.com, dlemoal@kernel.org, nitheshshetty@gmail.com, gost.dev@samsung.com, Kanchan Joshi , Javier =?utf-8?B?R29uesOhbGV6?= , Anuj Gupta , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v12 5/9] nvme: add copy offload support Message-ID: <20230710061401.43uzki644sw5jagz@green245> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20171215 X-Brightmail-Tracker: H4sIAAAAAAAAA02Te0xTdxTH+d3b3hYZ5gISf+ADcjed4MDWlfJDYC6DmOtwhCmbi1nCOnpH EWibPsacMVIY76f4GHSggiDPQaBsAwHHygAFtF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VqUX58UWlOanFhxilOViUxHmVczpThATSE0tSs1NT C1KLYLJMHJxSDUzMh+RcBTh2ehzl4HRosmI99OVHYN3f5oS0m1JfDv7ZoOeWq5//6o3VgbIb E66/TKi7+lSF52+9gAWfXli8gXBX/Z7Pny9Hxe+WnRKvuT7kU+PNFc3zhN5EuV1LO+z/Wj1r J+dNz1XeUgVOdbf0Oo7JzN+0KfvR7fNnOp/nvBQqNV93uMEwOluwUrSR/4PjSffmZU9Yrh02 POe4e/H0u+pBJ3LOG55k9HylE9T+9DFnm3vEcr0bnk92fHa99c84MjO8e+/M7ftUBR+xSeun 7Nh62kr/oUiac9gM40n27xrjpb/kbfVYscvqZqbH/phTBcIyf/Re3HDzS3nSkSx2uO7+erP7 v3daugYtqBOaX6rEUpyRaKjFXFScCACXJ/QPkgMAAA== X-CMS-MailID: 20230710061719epcas5p36b7be425517b0b09d73540b18fc17748 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----RbnLpepSOhDWt1JmDV6HMUWO9Dmn-C3OOrycHY1seGoKI43i=_b1f2d_" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230605122310epcas5p4aaebfc26fe5377613a36fe50423cf494 References: <20230605121732.28468-1-nj.shetty@samsung.com> <20230605121732.28468-6-nj.shetty@samsung.com> <20230606113535.rjbhe6eqlyqk4pqq@green245> <20230608120817.jg4xb4jhg77mlksw@green245> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 ------RbnLpepSOhDWt1JmDV6HMUWO9Dmn-C3OOrycHY1seGoKI43i=_b1f2d_ Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Disposition: inline On 23/06/08 09:24PM, Christoph Hellwig wrote: >On Thu, Jun 08, 2023 at 05:38:17PM +0530, Nitesh Shetty wrote: >> Sure, we can do away with subsys and realign more on single namespace copy. >> We are planning to use token to store source info, such as src sector, >> len and namespace. Something like below, >> >> struct nvme_copy_token { >> struct nvme_ns *ns; // to make sure we are copying within same namespace >> /* store source info during *IN operation, will be used by *OUT operation */ >> sector_t src_sector; >> sector_t sectors; >> }; >> Do you have any better way to handle this in mind ? > >In general every time we tried to come up with a request payload that is >not just data passed to the device it has been a nightmare. > >So my gut feeling would be that bi_sector and bi_iter.bi_size are the >ranges, with multiple bios being allowed to form the input data, similar >to how we implement discard merging. > >The interesting part is how we'd match up these bios. One idea would >be that since copy by definition doesn't need integrity data we just >add a copy_id that unions it, and use a simple per-gendisk copy I/D >allocator, but I'm not entirely sure how well that interacts stacking >drivers. V13[1] implements that route. Please see if that matches with what you had in mind? [1] https://lore.kernel.org/linux-nvme/20230627183629.26571-1-nj.shetty@samsung.com/ Thank you, Nitesh Shetty ------RbnLpepSOhDWt1JmDV6HMUWO9Dmn-C3OOrycHY1seGoKI43i=_b1f2d_ Content-Type: text/plain; charset="utf-8" ------RbnLpepSOhDWt1JmDV6HMUWO9Dmn-C3OOrycHY1seGoKI43i=_b1f2d_--