Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22184730rwd; Fri, 30 Jun 2023 05:09:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlHsBG73oVxVPS2544c1cLYt6M+9Fc4gM63MrWh5x8zg9Bz1TKkd10+nH9loQu2+prOopVtG X-Received: by 2002:a05:6a20:3c86:b0:12d:5999:6224 with SMTP id b6-20020a056a203c8600b0012d59996224mr1731812pzj.13.1688126957843; Fri, 30 Jun 2023 05:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688126957; cv=none; d=google.com; s=arc-20160816; b=IvqcHYGyUNPHAdE2FLsqoq0FeGbwPw4Bx6G8l6t5CfFQyLBmXP+PD7r+ATAeeC6+xX AXWUcyz44GUKBUkW750Vq9QhrpLmYFBhB9D+B5nknSyErhEykWbw/4qDlCjTHT/xtRFd SvQkwWQ3thyzyt6at88gP02uPr8WrHyw3kwgmS48V+4chMtmmdSxicAzMh9TfiDZm/SW zVdtznqFOMbSDiN7z0BDhyaRHuwyHZdA/QhwtP/GgfnLGKFVknRxm5T6E9AZf8dCXRle zO/O9E2/V+5+w8mOY6B2WAEffWVFJePGM0pzvMB/1a+1JaWkHitGf3uf+n6g73sObD6R TMDw== 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=zZubjPAKe4tJnP79rh7RaaQDYvtmoDCtXsGDKlJ0uFY=; fh=ADw+/0s7o6Z6tQuB+bUP7OTBFt7nQ1LOKRVaak3JKy8=; b=P3gcoUYndvfXEiMgmSlxj6nPmo3DGVH/z7kHZ+XeqcwHlFjG/u4mXiVr2FwuS+kA/4 aSvfbR+uHbPQqZk1PtrT5j/qXRYMi2f3RU+Vk43/UXt5aX+18/zzHtYQZ8lfpinOggr1 d3/jqIPpSE8J2rOgVOIekFGY/NV/Lrv0OXfrw+tRQK+HLldznTBv16ZjAPud3DpS0cfy +pN1B427Nkjhp5tH69qkEHzve4rgK/qMX5dXkc/18Ug0y14pashYihdaCCBpyiqyfMPe He+mrCYCaCtWqNibP2ooONl9suZZ8qjfz7SnQM0FKgHJhOOQm/J5sNnei2ULZqvqQe7X zTvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mfshBycp; 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 fd35-20020a056a002ea300b006687406605asi13065860pfb.211.2023.06.30.05.09.04; Fri, 30 Jun 2023 05:09:17 -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=mfshBycp; 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 S229578AbjF3MCv (ORCPT + 99 others); Fri, 30 Jun 2023 08:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232921AbjF3MCs (ORCPT ); Fri, 30 Jun 2023 08:02:48 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBA35E72 for ; Fri, 30 Jun 2023 05:02:44 -0700 (PDT) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230630120241epoutp0116799b1732a64dcac5a330a1d5b9d315~tbin6w_WE2143121431epoutp01U for ; Fri, 30 Jun 2023 12:02:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230630120241epoutp0116799b1732a64dcac5a330a1d5b9d315~tbin6w_WE2143121431epoutp01U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1688126561; bh=zZubjPAKe4tJnP79rh7RaaQDYvtmoDCtXsGDKlJ0uFY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mfshBycpvotrExq2m0BfCgxTNRVu78AGdZbgkTTKze+GZKQOwRURXGW1hTGfKUrZe zm2oJZqdd/yTj4QLaCbp+j7ZDivfd3I/TcqCAcRAxDI2Pqkk069kLOF0ncu3zjqEXA 4hfB2hIz4tFIAr7mfvYYzrMWKwanER58x5e+432M= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20230630120240epcas5p3d08ca980d5065aa551daa2fd10006566~tbim_nHMD0126501265epcas5p3B; Fri, 30 Jun 2023 12:02:40 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.181]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4Qsv8H1L2xz4x9Pt; Fri, 30 Jun 2023 12:02:39 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 4F.E6.06099.F54CE946; Fri, 30 Jun 2023 21:02:39 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20230630112545epcas5p1746ef2fc966c04b3a8163e0dff21fb4b~tbCXgpz0S0278302783epcas5p18; Fri, 30 Jun 2023 11:25:45 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230630112545epsmtrp100ac18072070bde82f83c688a8d35218~tbCXeO08n3247532475epsmtrp1R; Fri, 30 Jun 2023 11:25:45 +0000 (GMT) X-AuditID: b6c32a4b-cafff700000017d3-cb-649ec45f75e7 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 01.DC.34491.9BBBE946; Fri, 30 Jun 2023 20:25:45 +0900 (KST) Received: from green245 (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230630112540epsmtip25264414e861bfa35bbcaec8407f2f7ff~tbCTNRWsE1020410204epsmtip2Y; Fri, 30 Jun 2023 11:25:40 +0000 (GMT) Date: Fri, 30 Jun 2023 16:52:27 +0530 From: Nitesh Shetty To: Ming Lei Cc: Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , martin.petersen@oracle.com, linux-scsi@vger.kernel.org, willy@infradead.org, hare@suse.de, djwong@kernel.org, bvanassche@acm.org, dlemoal@kernel.org, nitheshshetty@gmail.com, gost.dev@samsung.com, Vincent Fu , 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 v13 3/9] block: add emulation for copy Message-ID: <20230630112227.6ctls2vt4cy7vbxo@green245> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20171215 X-Brightmail-Tracker: H4sIAAAAAAAAA02TbUxTZxTHee69vS3EumuR+PCikOKyAQGpQPdAYAo6d5fuAwl+GQnild5R BNqmLbJhIqDAFAaoDDIrVFQcbwoIbOF1smIFMYwZBgisDLWgkw0QAnbjZWspLH77nZf/eZ5z Tg4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p1QDk7rf o41LXDk7Q6xd7wi3M/Qv4tP0F2fSWcqmyn15Q7P23BkLLn7RWj5p447Ne5/fudDZ+Oxcy8wO g9WNRcznxJeKHvFuuJj113Ll+tIviwL8Vdv3h2+6Wx4S3tAQt/Oq9GUR48nXfjy7sU/deMNN NiWXGl+uqTIT4v5vW8QcrTaxJ4UvvLL5+i1+PqWNhkEzlXfdE/T98ohLVHaGx+xzpnOb5Mv4 1Bh2q1YdUgv6/+bXxJPHuW9PE3j/QfKft/JjbW3Fh4G8TtyPFgT1KX4SdJHuEGvhMhLT0/l0 ZydPvNA1tetW96z8Z6jUa6fmH3Sc/mcpy+ntC1xqvR7t+Op+1Obws8wE1luBaq//lU6yV2Ip zkg01GIuKk4EAIi1iPiIAwAA X-CMS-MailID: 20230630112545epcas5p1746ef2fc966c04b3a8163e0dff21fb4b X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----zUAFM1k0MeHfMyR4CoO9aTysOnQiUYGsRe6BfqD0GhfqR3ws=_26e0b_" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230627184020epcas5p13fdcea52edead5ffa3fae444f923439e References: <20230627183629.26571-1-nj.shetty@samsung.com> <20230627183629.26571-4-nj.shetty@samsung.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 ------zUAFM1k0MeHfMyR4CoO9aTysOnQiUYGsRe6BfqD0GhfqR3ws=_26e0b_ Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Disposition: inline On 23/06/29 04:33PM, Ming Lei wrote: >Hi Nitesh, > >On Wed, Jun 28, 2023 at 12:06:17AM +0530, Nitesh Shetty wrote: >> For the devices which does not support copy, copy emulation is added. >> It is required for in-kernel users like fabrics, where file descriptor is > >I can understand copy command does help for FS GC and fabrics storages, >but still not very clear why copy emulation is needed for kernel users, >is it just for covering both copy command and emulation in single >interface? Or other purposes? > >I'd suggest to add more words about in-kernel users of copy emulation. > As you mentioned above, we need a single interface for covering both copy command and emulation. This is needed in fabrics cases, as we expose any non copy command supported target device also as copy capable, so we fallback to emulation once we recieve copy from host/initator. Agreed, we will add more description to covey the same info. >> not available and hence they can't use copy_file_range. >> Copy-emulation is implemented by reading from source into memory and >> writing to the corresponding destination asynchronously. >> Also emulation is used, if copy offload fails or partially completes. > >Per my understanding, this kind of emulation may not be as efficient >as doing it in userspace(two linked io_uring SQEs, read & write with >shared buffer). But it is fine if there are real in-kernel such users. > We do have plans for uring based copy interface in next phase, once curent series is merged. With current design we really see the advantage of emulation in fabrics case. Thank you, Nitesh Shetty ------zUAFM1k0MeHfMyR4CoO9aTysOnQiUYGsRe6BfqD0GhfqR3ws=_26e0b_ Content-Type: text/plain; charset="utf-8" ------zUAFM1k0MeHfMyR4CoO9aTysOnQiUYGsRe6BfqD0GhfqR3ws=_26e0b_--