From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95B0EC54EBC for ; Thu, 12 Jan 2023 14:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673534789; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Xs8dGGMEXs+pNNI2okE8aPO05zULnQwCMYKZOj5gWIg=; b=MwgviiPi/8dcdzR2KbDgGK4bLx7zrY/by9F5/0QlgIA79eSqLI0ZJSYOL2rb40OYSGx/h8 RJ1KCsTw8+4Yd9qifcv1wKq936faEdDBh78farS8ughI1BuCZII6sm4XXclXPJ+WJEJwYb WqvPup7CF7/vL56Fq1Eyvv3uK/CqjRY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-499-TeTni0HiPC-VnNcfN_rXig-1; Thu, 12 Jan 2023 09:46:25 -0500 X-MC-Unique: TeTni0HiPC-VnNcfN_rXig-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 762982804830; Thu, 12 Jan 2023 14:46:23 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFB062026D76; Thu, 12 Jan 2023 14:46:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8DA2A1947049; Thu, 12 Jan 2023 14:46:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BAB2C1946A78 for ; Thu, 12 Jan 2023 14:46:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id AD7B41400E44; Thu, 12 Jan 2023 14:46:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4CF914152F6 for ; Thu, 12 Jan 2023 14:46:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 89270385F360 for ; Thu, 12 Jan 2023 14:46:20 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-616-g4khQa7NMAy4qvzF9gdoew-1; Thu, 12 Jan 2023 09:46:18 -0500 X-MC-Unique: g4khQa7NMAy4qvzF9gdoew-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0A5D63FEBB; Thu, 12 Jan 2023 14:46:17 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DAFEB13776; Thu, 12 Jan 2023 14:46:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ++8qNTgdwGNiEAAAMHmgww (envelope-from ); Thu, 12 Jan 2023 14:46:16 +0000 Message-ID: Date: Thu, 12 Jan 2023 15:46:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 To: Nitesh Shetty , Jens Axboe , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , Christoph Hellwig , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Alexander Viro References: <20230112115908.23662-1-nj.shetty@samsung.com> <20230112115908.23662-4-nj.shetty@samsung.com> From: Hannes Reinecke In-Reply-To: <20230112115908.23662-4-nj.shetty@samsung.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Subject: Re: [dm-devel] [PATCH v6 3/9] block: add emulation for copy X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: p.raghav@samsung.com, Vincent Fu , joshi.k@samsung.com, gost.dev@samsung.com, anuj20.g@samsung.com, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, nitheshshetty@gmail.com Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" On 1/12/23 12:58, Nitesh Shetty wrote: > For the devices which does not support copy, copy emulation is > added. Copy-emulation is implemented by reading from source ranges > into memory and writing to the corresponding destination asynchronously. > For zoned device we maintain a linked list of read submission and try to > submit corresponding write in same order. > Also emulation is used, if copy offload fails or partially completes. > > Signed-off-by: Nitesh Shetty > Signed-off-by: Vincent Fu > Signed-off-by: Anuj Gupta > --- > block/blk-lib.c | 241 ++++++++++++++++++++++++++++++++++++++++- > block/blk-map.c | 4 +- > include/linux/blkdev.h | 3 + > 3 files changed, 245 insertions(+), 3 deletions(-) > I'm not sure if I agree with this one. You just submitted a patch for device-mapper to implement copy offload, which (to all intents and purposes) _is_ an emulation. So why do we need to implement it in the block layer as an emulation? Or, if we have to, why do we need the device-mapper emulation? This emulation will be doing the same thing, no? Cheers, Hannes -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E679CC61DB3 for ; Thu, 12 Jan 2023 15:01:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240266AbjALPBO (ORCPT ); Thu, 12 Jan 2023 10:01:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240141AbjALPAx (ORCPT ); Thu, 12 Jan 2023 10:00:53 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BFBC68CB5; Thu, 12 Jan 2023 06:46:19 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0A5D63FEBB; Thu, 12 Jan 2023 14:46:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673534777; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HrBrg5QvUAIEV+jz3DGdQVqQeKMcVuJL634mtXFHdsI=; b=rvj8/WFL8TbAB2ZWnYy2bPxp2tVG8pK6sI6j6WkIQ3UIdb+de+5QB/PO+3tldpBtdLYhVC mV+pOw6U3OR0KWe1atjFENO0aOUJin6qs/IXbkuqRyFwZqFqslp1DYPhS/6akESIzqZrJZ gsSwliW057MSrOwOR9pKwNH7j5l7PPA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673534777; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HrBrg5QvUAIEV+jz3DGdQVqQeKMcVuJL634mtXFHdsI=; b=ksPyq5Qj7locvziy9JH6dr1AxpNnr4pHprnB3EftuUgp4QpX8QuSTv3VOqEjgavELrrL6f UTaC7oQ+mh8kFcCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DAFEB13776; Thu, 12 Jan 2023 14:46:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ++8qNTgdwGNiEAAAMHmgww (envelope-from ); Thu, 12 Jan 2023 14:46:16 +0000 Message-ID: Date: Thu, 12 Jan 2023 15:46:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v6 3/9] block: add emulation for copy Content-Language: en-US To: Nitesh Shetty , Jens Axboe , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , Christoph Hellwig , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Alexander Viro Cc: anuj20.g@samsung.com, joshi.k@samsung.com, p.raghav@samsung.com, nitheshshetty@gmail.com, gost.dev@samsung.com, Vincent Fu , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org References: <20230112115908.23662-1-nj.shetty@samsung.com> <20230112115908.23662-4-nj.shetty@samsung.com> From: Hannes Reinecke In-Reply-To: <20230112115908.23662-4-nj.shetty@samsung.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On 1/12/23 12:58, Nitesh Shetty wrote: > For the devices which does not support copy, copy emulation is > added. Copy-emulation is implemented by reading from source ranges > into memory and writing to the corresponding destination asynchronously. > For zoned device we maintain a linked list of read submission and try to > submit corresponding write in same order. > Also emulation is used, if copy offload fails or partially completes. > > Signed-off-by: Nitesh Shetty > Signed-off-by: Vincent Fu > Signed-off-by: Anuj Gupta > --- > block/blk-lib.c | 241 ++++++++++++++++++++++++++++++++++++++++- > block/blk-map.c | 4 +- > include/linux/blkdev.h | 3 + > 3 files changed, 245 insertions(+), 3 deletions(-) > I'm not sure if I agree with this one. You just submitted a patch for device-mapper to implement copy offload, which (to all intents and purposes) _is_ an emulation. So why do we need to implement it in the block layer as an emulation? Or, if we have to, why do we need the device-mapper emulation? This emulation will be doing the same thing, no? Cheers, Hannes