Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp146209lqr; Wed, 5 Jun 2024 01:27:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWU1sd9bE8PyZf9tLor0cqHiYp7f3ndII1n8IVvcuCOF9mzGX4GuzaFXR7c8eIeEgjihYAp3eJg2bXvz3lkYkWZRmOONqC0a0Ldp6VJ9Q== X-Google-Smtp-Source: AGHT+IH516ss7rFTW3ZnyfAb2dvSKE4r/Y3eTMna3LGiCH64MrX3VOvX7CbswKfcA3C25tQCV3b4 X-Received: by 2002:a17:906:d110:b0:a59:9c58:763a with SMTP id a640c23a62f3a-a699f88ad1bmr112245666b.46.1717576028770; Wed, 05 Jun 2024 01:27:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717576028; cv=pass; d=google.com; s=arc-20160816; b=avE1DnxDsOgNIQt3AlxG09d4ntJRAqI47VjhXvKJPju3ShW8mqAWhOGVfSs6saoWfD plaRgBNtcZ9AgsxcAMZ3hTTw+c6yyMeRwCvcXbyczhBwf35+5+KBxWKzRqTUhdnSiNxj 5huBxy8iAVg71vQpE2wS3FmcG+KvqFImC97xN5QUbzdnkkZhHqbYwIrHqpgV+RkPg+I3 udfjrqjvCh91/RACpOgz/k3qycnLhSOYhABtsjyWXCRxlxPwDxxl8gcMW4Jsi6us63rq HMCWqPIzqCpKzOzoo/FqeHmfoXvywbsmY70BJVtVSkAFbHtAjMKPWy+SeQabEQQDzNGz 7bGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=sRIYdy7Cw8WjP83tVRIkaBNCw93lHm89f0CKTl2PtMo=; fh=Rn495xOAHcdGsoyMZav3fOiulm1Z/PF+8laloJm+6Ys=; b=Ikm9QhyoKUa8ybgkYu5slj70NWvXxwnx8WdSJv+lNRIw6z6txac1I/nThWX/4U+QJS wapbjkeecwyVSJR6cVlMGPRlNUWWxj94hrOePVaQMhS4MV1D/EqhsdiEtLKBQ+DQN1Gb H5s80GE6H+tertSGOmldZ0PZYlRZwfe+vSxX1L2sYhgSqoDeLxUHx8rtfkxGIf1Ccc9/ A94rlnGXAamDW7piGO3CDYSifOFCpZP37psppxBWsOzUszsT29V56IwzYCISCBzNyyTo vIB0BU71zjG1Z54ixZAqZTcVpabFkVMDKMKs5SmEDRI8PouHv/lcGssdhjKUm6Xpdjhy 0jwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-201988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201988-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68b3ff90d5si449476466b.1052.2024.06.05.01.27.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 01:27:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-201988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201988-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 734351F24807 for ; Wed, 5 Jun 2024 08:27:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F4C7193097; Wed, 5 Jun 2024 08:20:37 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5192E193080; Wed, 5 Jun 2024 08:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717575636; cv=none; b=pACCY9viVNTzZxRpPVmcZtcDPpSw7rDAmtCNIyY91Uocr+4bJ6jMIFK5u0Tq/mLr6/1d0ZLofjHO++h+JEnv0lCpthrUGnoaKUNeQRmrRARnHCvE54vslraYNNfVm51hRCLPdsdGiCBUflIti/M3hYn9KqKBd0XjnhwaxXj/ndU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717575636; c=relaxed/simple; bh=196DRXrCJn+tQRx2ZKFZsFFDrXq1ezqD5rJSeNZaSDY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DXa/PcvValDBgrNS63iRTVcYhDFJ1kER6qyQg8RpJRkhtknIH6fDJp9q9RnmKrfY8zSSRovNgRew4yDjV0xIf8YzEN/RkPv8nt8kW0USt9mNg4T2KlKUTd/wwqcrJomiU9ZPDNCZqQqSz8hYPZ5PjTneJ+z5eM5DfddjlKwrsJQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 3369B67373; Wed, 5 Jun 2024 10:20:29 +0200 (CEST) Date: Wed, 5 Jun 2024 10:20:28 +0200 From: Christoph Hellwig To: Bart Van Assche Cc: Christoph Hellwig , Nitesh Shetty , Damien Le Moal , Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , Mikulas Patocka , Keith Busch , Sagi Grimberg , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , Jan Kara , martin.petersen@oracle.com, david@fromorbit.com, hare@suse.de, damien.lemoal@opensource.wdc.com, anuj20.g@samsung.com, joshi.k@samsung.com, nitheshshetty@gmail.com, gost.dev@samsung.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, dm-devel@lists.linux.dev, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer. Message-ID: <20240605082028.GC18688@lst.de> References: <20240520102033.9361-3-nj.shetty@samsung.com> <9f1ec1c1-e1b8-48ac-b7ff-8efb806a1bc8@kernel.org> <665850bd.050a0220.a5e6b.5b72SMTPIN_ADDED_BROKEN@mx.google.com> <20240601055931.GB5772@lst.de> <20240604044042.GA29094@lst.de> <4ffad358-a3e6-4a88-9a40-b7e5d05aa53c@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ffad358-a3e6-4a88-9a40-b7e5d05aa53c@acm.org> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Jun 04, 2024 at 04:44:34AM -0700, Bart Van Assche wrote: > On 6/3/24 21:40, Christoph Hellwig wrote: >> There is no requirement to process them synchronously, there is just >> a requirement to preserve the order. Note that my suggestion a few >> arounds ago also included a copy id to match them up. If we don't >> need that I'm happy to leave it away. If need it it to make stacking >> drivers' lifes easier that suggestion still stands. > > Including an ID in REQ_OP_COPY_DST and REQ_OP_COPY_SRC operations sounds > much better to me than abusing the merge infrastructure for combining > these two operations into a single request. With the ID-based approach > stacking drivers are allowed to process copy bios asynchronously and it > is no longer necessary to activate merging for copy operations if > merging is disabled (QUEUE_FLAG_NOMERGES). Again, we can decided on QUEUE_FLAG_NOMERGES per request type. In fact I think we should not use it for discards as that just like copy is a very different kind of "merge". I'm in fact much more happy about avoiding the copy_id IFF we can. It it a fair amout of extra overhead, so we should only add it if there is a real need for it