Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp475744lqb; Wed, 29 May 2024 00:58:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhfXEcG2v9akTLb7/7kMGfW3B2Bt4NVJV7D5yh47DydkfAQ5LWV+I5XHy0QOOOVSrWpC5/aw7y/xgb3s3faUEk2/aVZbwY2jWRnFP3iQ== X-Google-Smtp-Source: AGHT+IG89P9t5bi4hyXwpFlcCrMP9MNYqjhfLIliOnMZklaCBvLNf5AlszSwu6NQpywvw8tEPcwq X-Received: by 2002:a05:6512:4c1:b0:523:54a2:3836 with SMTP id 2adb3069b0e04-52965f10e3dmr10474067e87.33.1716969483110; Wed, 29 May 2024 00:58:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716969483; cv=pass; d=google.com; s=arc-20160816; b=owQVAB/ECf6fRPQAkEjwnhtxG3EH/yiEvw2fO8CGIk/C5bWcEjyXuDPO+PRj/3Ldf3 Ghu/PCF4uMEvd96u8ro6zM7drDkHL+gSFaq3bUxdi6NEfu1YJPfolJyxzGkj11/0dHJ2 t96yXl2p5qFGPMQFz+2BGAietdmz4itADsphjYj3F5mo4pRllXgpb2cznk11E8/uqwq5 Nim0u1b7kkPzgWx2ZPzQlYClZn3ChP6vsaZqRmydB4IRrbh1tt4SBFpL4Eha1VtEnOSe 6+zTOM4rSsOYxW6sFGhaBORtXKLS9D/hFdtKZKGijsPWPouU8x71wKBDvECUVWcpG2DP 6BYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=bB0HANADKEt7RaCD2J1XtUdtzqjGQA/PQ6f6Pbtfj7A=; fh=FNptaUsIxYaeoIursXxtf+YX4Nv0/LV2G8DyHLbTQC0=; b=mEp2+o4s50SAFcE9NpkI7SPro6i3y3U7MHLenf8CPn3yxD6vl9BVcCKIpbt0AjsXdu juwry+cOl29GL0Tv/U0w9ikGWZ3PTOXvcfn583Q61Ot4ndt0TAiQ4pGEY9jGLTgC+rhn fGenbLWViKWQRxT6mLMlgWIBKBS7q4IFY/ceA0JmlISnDDk3s34ZnrF+rxAAinnN8W5y FWLPnYoZsKSgXnAE0ohRJftyfqiadjB87o91q28TzZlO2Cla7sJKBKiFNOU50DBOBu7h DV8/9S0fHgNyfG6C8JWrDGF/fptc90Gt2QfaOqm6u2XfVsWsdlA6E2YI9bPEE2VzztQD DZaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dfbgA6jN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193634-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193634-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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-a626cd9182csi594967666b.732.2024.05.29.00.58.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 00:58:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193634-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dfbgA6jN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193634-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193634-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 86E741F2B34F for ; Wed, 29 May 2024 07:49:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7670C16A374; Wed, 29 May 2024 07:48:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dfbgA6jN" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 89832168C3D; Wed, 29 May 2024 07:48:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716968903; cv=none; b=AgKiAlLGKjjHD1FlVwQGkCvuGbonD+yPwxCi9NFyAz9XwfkBdl11WxpkXXwjvTOM3wyFD9PSIr65Ff6tsg+xpy5sZ1aQ71qYJxyZskij1Gb/Mw/GN+rg378CHhr0yWxyO/IrW880ruIZcoCzpqg4/aALnp97RK75o452yN+N/Wo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716968903; c=relaxed/simple; bh=S3iTcM1ZSPmjm7GZozDt8RGkp17GchQ3Ca1mGNH4Urc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GjRZQkdMKZgcQdVHlToFkLnSnnqrOn29v5LPQqdVK6arkKQQYQtKHCG1H/UhEqhAv99TtWd1y+0TWnbbBMFYvvYBRyVjWmswIUmKiX2WpmayH1fBLa6MgbJWMFCiZDH5IFpUpoDXvDjWNvxBXEdKIjWVzj9v9SPyQ4BwyeEmg2A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dfbgA6jN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B05F7C2BD10; Wed, 29 May 2024 07:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716968903; bh=S3iTcM1ZSPmjm7GZozDt8RGkp17GchQ3Ca1mGNH4Urc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dfbgA6jNdLtv905YzgHRwUpIcUYBb2/FqhbHwVVPi8jDYBzJegkHqnKtVllDgSZxJ hl119F1YITV2L0CzUXjFMz0P8CY1JoKC531SnvSR0HoJ9YdSPXasTOt6h/EqHBOz5D L6tidnnLJT9F5jmKbw3Jjz/je6ejB31Y6FneddoZhnRuBt9uZ2weZz0M8qraIlnOGu b564lvPJrYPe1xyTLSU6lOiEFiwyarsZVBy/9tTbFhKAXiUQ99rmKkFZCc0tkP24fr AM3HjKJP/ev9C0RkvyustpQi11rCci5L99jxRXkdkeoJFk08ttBvU+/Hb1H+2ytDwu nVyuobiiw1hmg== Message-ID: <9f1ec1c1-e1b8-48ac-b7ff-8efb806a1bc8@kernel.org> Date: Wed, 29 May 2024 16:48:18 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v20 02/12] Add infrastructure for copy offload in block and request layer. To: Nitesh Shetty , Bart Van Assche Cc: Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , Mikulas Patocka , Keith Busch , Christoph Hellwig , 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 References: <20240520102033.9361-1-nj.shetty@samsung.com> <20240520102033.9361-3-nj.shetty@samsung.com> <20240529061736.rubnzwkkavgsgmie@nj.shetty@samsung.com> Content-Language: en-US From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20240529061736.rubnzwkkavgsgmie@nj.shetty@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/29/24 15:17, Nitesh Shetty wrote: > On 24/05/24 01:33PM, Bart Van Assche wrote: >> On 5/20/24 03:20, Nitesh Shetty wrote: >>> We add two new opcode REQ_OP_COPY_DST, REQ_OP_COPY_SRC. >>> Since copy is a composite operation involving src and dst sectors/lba, >>> each needs to be represented by a separate bio to make it compatible >>> with device mapper. >>> We expect caller to take a plug and send bio with destination information, >>> followed by bio with source information. >>> Once the dst bio arrives we form a request and wait for source >>> bio. Upon arrival of source bio we merge these two bio's and send >>> corresponding request down to device driver. >>> Merging non copy offload bio is avoided by checking for copy specific >>> opcodes in merge function. >> >> In this patch I don't see any changes for blk_attempt_bio_merge(). Does >> this mean that combining REQ_OP_COPY_DST and REQ_OP_COPY_SRC will never >> happen if the QUEUE_FLAG_NOMERGES request queue flag has been set? >> > Yes, in this case copy won't work, as both src and dst bio reach driver > as part of separate requests. > We will add this as part of documentation. So that means that 2 major SAS HBAs which set this flag (megaraid and mpt3sas) will not get support for copy offload ? Not ideal, by far. -- Damien Le Moal Western Digital Research