Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp427946pxu; Fri, 4 Dec 2020 06:45:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGCK/Zy1c3dt1gTPetboD0/HZ8q7zYtVSEn21oU5Rz/fr9G9FsukiTlEJImBeFYeZJHIk5 X-Received: by 2002:a17:907:94c6:: with SMTP id dn6mr7479262ejc.13.1607093141189; Fri, 04 Dec 2020 06:45:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607093141; cv=none; d=google.com; s=arc-20160816; b=nkKhUMKScGu2xk80WRe/v+HXr5URIXV4s9q8c65Lw+tS0s7LNp9U5De++zmiCA0lHy HiCONC5h4ZAxZHvWmWSyarmMIzPvdOpDTEfUufReLXFdZ9yiGdBPkBJza1ncdMgU5B2D QsRoBmD3XYoeJud++D8mej9teGP2QlwJnf5xc0DCQproOsq54u6Klps/I4CDAUT1FeFI n38XDCwskr5XTqc3+AtCTW8m9PYxikfFoXryQ3VZi8lyKKh+UPYn9re6Q2a90eTCbU+c 45hEhxbdIZ+VVH8CJKIasR8khsTAINKgqM1ROKx0+LX5vxlsDEgel/CF07MEL5o4NiSR mWSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:date; bh=sUucp5TDtdRCt48eNRCkJjE8KPakTO9RXIvy+drwvkU=; b=lrVkZbhsuAy2eAxQefdTy8O0XccVXxjbbgh4LsSWqSqIaYDY/Bn4djdVRqZjTmZ11V I60K4RtGGYAdGwznwA6AJblIBZglb+rPtvJKRnowWaWEqn9kviE8vRe5bSQRivzvzQWM pebLc4Ebb7lTqCyjFE4jlaBMo87H7YF1NcFlR8yBzqG590km12FWEYNJXcFEP2U6q+bo /T/0eynlcHIXNciA4WozUwMyZL0kijlY7ahqWO8/2oBIV9sGI6CyB5Tr81ToOF2Es4AO qAfdcPt0yaOZdY6jJXIm1O4kRLJB1bgcTlDFO1Kc66HNEXmkFsHIeX0zzJgo5KquTiuq KutQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I7lh3BQP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p19si2914236edu.169.2020.12.04.06.45.16; Fri, 04 Dec 2020 06:45:41 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I7lh3BQP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730366AbgLDOkv (ORCPT + 99 others); Fri, 4 Dec 2020 09:40:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:56214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726438AbgLDOkv (ORCPT ); Fri, 4 Dec 2020 09:40:51 -0500 Date: Fri, 4 Dec 2020 23:40:03 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607092810; bh=uvtPoUqekE4ysrPkcwN2m2pvmLXmJsPsKTH0pCoQOwU=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=I7lh3BQP018ZryVSybF2HF+vDP9xIgie2+3oUbLevvAPt1bI5uCSFT3O857/mw6tH 2dAaMkiSlJXFlsnh7E0zL6i1ElPKE7r97FFgtt6lG/FG7sgDmFmSvksH0gtqds8JXZ euyKyTB+IFz5FZVtcc5dVttsZdsYwdKPCl9uNPPLPWjGb6fLqdwH+pLhxMwvIbUEUU z1BaIEGceWAPgxjSoh8MfssdXWvYRWhotdB6/h+0AkWnbw/4Qhf4XxNZ+6czkvqrIK 4tpPwkUiWg/9BcaCRZXxvJjLDifRCK+bJJWSL3x6AuAEW5DzAaRTdAjKcR6ixo9jAi klEnMtskQGb3w== From: Keith Busch To: Damien Le Moal Cc: SelvaKumar S , "linux-nvme@lists.infradead.org" , "axboe@kernel.dk" , "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" , "nj.shetty@samsung.com" , "joshi.k@samsung.com" , "javier.gonz@samsung.com" Subject: Re: [RFC PATCH v2 0/2] add simple copy support Message-ID: <20201204144003.GA8868@redsun51.ssa.fujisawa.hgst.com> References: <20201204094659.12732-1-selvakuma.s1@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 04, 2020 at 11:25:12AM +0000, Damien Le Moal wrote: > On 2020/12/04 20:02, 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 > > > > This is an RFC. Looking forward for any feedbacks or other alternate > > designs for plumbing simple copy to IO stack. > > > > 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 accepts destination, no of sources and arrays of > > source ranges from application and attach it as payload to the bio and > > submits to the device. > > > > Following limits are added to queue limits and are exposed in sysfs > > to userspace > > - *max_copy_sectors* limits the sum of all source_range length > > - *max_copy_nr_ranges* limits the number of source ranges > > - *max_copy_range_sectors* limit the maximum number of sectors > > that can constitute a single source range. > > Same comment as before. I think this is a good start, but for this to be really > useful to users and kernel components alike, this really needs copy emulation > for drives that do not have a native copy feature, similarly to what write zeros > handling for instance: if the drive does not have a copy command (simple copy > for NVMe or XCOPY for scsi), then the block layer should issue read/write > commands to seamlessly execute the copy. Otherwise, this will only serve a small > niche for users and will not be optimal for FS and DM drivers that could be > simplified with a generic block layer copy functionality. > > This is my 10 cents though, others may differ about this. Yes, I agree that copy emulation support should be included with the hardware enabled solution.