Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3799160rdg; Wed, 18 Oct 2023 06:32:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+yPIR5VvTaDLt2FndJbG0zCEsutSrTAsBsTqzIg7FFQ7CQ3oTIrdgarj7zilcClp9drYy X-Received: by 2002:a17:902:d485:b0:1ca:28f3:5690 with SMTP id c5-20020a170902d48500b001ca28f35690mr6610907plg.46.1697635931646; Wed, 18 Oct 2023 06:32:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697635931; cv=none; d=google.com; s=arc-20160816; b=JdiEr46vlzYFNaONj6Y3Arnt3Ourmm3dvR8PNeD1LXqczzIPmo0xsXXjoqwlHRxwYt dxzolA6Ye9xl5G7YXFsAuGobDZ+m3p7eWGSJ0Wun1fyku3OXC0py1FJaS1TPPgCM9qHH Ii38Dku+Jwj7baLftrrezqprZqTabdcHcnc09wpVCjml/2JylzwxqRDXYIvXg+WSDLcU bBLT1nvnxqKf3sy3gIdnJFGqQbJBRSEXnHuewTTBYMfG9QNUZrsY8L+gYqd1CBjHYtzM bzPXwx8DbO1GiTTzBAE/KOfwXmZ3qy1LKCP4gD562iZ3MF4Q+pdbvqcw5PvTYI+2KM1d PD8Q== 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=u3aqnbBtv3vyIec2Mlnu7VZjNoMVUqew8xlxNtYVuT0=; fh=hpXD7VKSY/vBYfK8Nh/NwGHrIvi2T/3K21mJat8e/L8=; b=InfuD5XTzjb8djF7WJCpQ943jRTpD7V4SBj9YnMr5mvKgKUbxZcEUOXlvIy8zD88GL pXguTPtCCz5C67IJP+U0iuTtuHn0Pqyu0PcOLXab6UHItUY0b/fjxLWb17O1JFcMGSjh 840jh5IVyk4nAigfZhy67Inyb1aYQx7wDfToSzidtoPeEa6goPXoK3uBV/X/gHDnQ5co nkgghJrRdvBGInEml43NOWZSZdwIqnMptGm+1gkKf92PdW5YYcRK0Y619CrjIDZDYhfA MiBglvsvz7oUdnlATBkk0jUGAdqZVsznK8wge7SBFoIlSi7ua8IQAdmLSZY8szR7bjH2 tCrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ar6xkA8W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id k4-20020a170902d58400b001c6285295absi4332379plh.514.2023.10.18.06.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 06:32:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ar6xkA8W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 317E58183EE1; Wed, 18 Oct 2023 06:32:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344475AbjJRNcD (ORCPT + 99 others); Wed, 18 Oct 2023 09:32:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231637AbjJRNcB (ORCPT ); Wed, 18 Oct 2023 09:32:01 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6701E109 for ; Wed, 18 Oct 2023 06:31:58 -0700 (PDT) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20231018133152epoutp02a5fcb90096a26ca1ed0b21f798a477ca~PNt5O-YWb1997519975epoutp02k for ; Wed, 18 Oct 2023 13:31:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20231018133152epoutp02a5fcb90096a26ca1ed0b21f798a477ca~PNt5O-YWb1997519975epoutp02k DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1697635913; bh=u3aqnbBtv3vyIec2Mlnu7VZjNoMVUqew8xlxNtYVuT0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ar6xkA8WBl8DA0SXsHcUVW75HU2NC5zijFCz8StrEtpWkgAFvxJxoiUkdTrbqG2y9 kgPzjsOUDvtGuJ9jGcdZBnry/lrAS/Wvvukv0pFZtjxUUtp/o5adSXHk78H6c7+rhD ESb9LwyAHWcb+xFbPHmL/0g2YvO2tm7JqVe+KF1E= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20231018133151epcas5p32eee98f338fcffca106dc084b9405c3d~PNt3_9ePq1794217942epcas5p34; Wed, 18 Oct 2023 13:31:51 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.179]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4S9WwP5y9Yz4x9Pt; Wed, 18 Oct 2023 13:31:49 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 1F.31.10009.54EDF256; Wed, 18 Oct 2023 22:31:49 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20231018101516epcas5p2ac132e21cc9f83edd819c7680a51487d~PLCPQwGhZ3226032260epcas5p2g; Wed, 18 Oct 2023 10:15:16 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231018101516epsmtrp23a828f342d83585a91c501a654146b0c~PLCPPbHfq1426614266epsmtrp2K; Wed, 18 Oct 2023 10:15:16 +0000 (GMT) X-AuditID: b6c32a4a-ff1ff70000002719-05-652fde45eb1a Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id BA.0F.07368.430BF256; Wed, 18 Oct 2023 19:15:16 +0900 (KST) Received: from green245 (unknown [107.99.41.245]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231018101513epsmtip27d59481a87c3dbfc474968108748ac3d~PLCMGR7Ek0062200622epsmtip2h; Wed, 18 Oct 2023 10:15:13 +0000 (GMT) Date: Wed, 18 Oct 2023 15:38:48 +0530 From: Nitesh Jagadeesh Shetty To: Jinyoung Choi 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" , "nitheshshetty@gmail.com" , "anuj1072538@gmail.com" , SSDR Gost Dev , "mcgrof@kernel.org" , Vincent Kang 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 v16 04/12] block: add emulation for copy Message-ID: <20231018100848.i26yrkuufv4koluq@green245> MIME-Version: 1.0 In-Reply-To: <20230926100718.wcptispc2zhfi5eh@green245> User-Agent: NeoMutt/20171215 X-Brightmail-Tracker: H4sIAAAAAAAAA02Te0xTVxzHd+4tt4VRdgGZpzAeueAiyqMFWg7KY4mPXMeysZCwqTNY22vL gLZry9zIkhUYQ94gzmARhYzxqFNGB6SIMASURxA3HTCIGMyAhIE8ZMgYAVdaWPzvc77n+z2/ c37nHA7uZGS7chIUWkatECdRhB2ruct3r/+RJ4EM32TyR/X993C0tLLOQulFGzi6Pl5IoNmu 5wBNdmQB1DZfZoNGO1owVHf9LobyC5sIdKFzGKCpIT2G2sb2o8pvq1jodlsfCz26dYVA16qn 2Ch3xESgmp5NDP1RNAWQaTINoJuzCyzUO+aG/sw9D9CDjR6bd3h0i36cTT940sCiH91PoY2G bIL+ueprunVUR9DfF5TY0PkZ8wS9NDXGohfahwi6oNEA6GWjB22cfIbFcE8khssZsZRRezEK iVKaoJBFUNGx8YfihSK+wF8QhkIpL4U4mYmgDr8X4380IcncBMrrc3FSilmKEWs0VGBkuFqZ omW85EqNNoJiVNIkVYgqQCNO1qQoZAEKRntAwOcHCc3G04nymew1G9Ui+4vKqV8IHRgjcoAt B5IhcH0gDc8BdhwnshXAjrtz24PnADavNrGtgxcA6pavgJ1Iw1Uje4udyDYASy6praZpAB8/ zGVtTbDIPTDrTprFRJBC2NqQYdY5nF2kH8w0eG/5cbKCA9tHblgWfY2MgsZ+oyXrTIbDpsLb liyXFMHpBhNmZUfYd3nS4rElQ6Eu657F40K+BUt/WLFsG5KDtrD8t9+3d3oYZv9azbKyM/yr p5FtZVe4PN+23YBzsO5iLWENfwOgfkS/HY6Cmf2F+BbjpBwO5OfZWHV3+F3/TcyqO8D89UnM qnOh6eoOe8Mf6yu2C/Dg8GoasXV6SNIw46dT1m5VYXBwdQIvAl76Vw6nf6WclQ/A7MX0bfaE GU1luN68FE66wZpNjhV9Yf2twApAGACPUWmSZYxGqApSMOf+fwkSZb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PbMCej78UFqO jS4owGBebgcxGvjChtN2j8b/lPJuduIjC3BaCIvc1KgdBPVlJs+h3vQCqEuv8zAn0FNg7sVv uAH4G8eQjGNIxv8k4xjSWUCUgEBWpVEqlFukKmkSu1uikSs12iSFZMt2JQc8TxISXA7e5Lsl VoBRwAoghYsCBAqZmPUTxMn37mPV2zertYmsxgqEFCGaJJDmmuL8aIV8J7uNZVWs+l+KUd6T dZjY1/qra77a0m69ccX86WTkJi+Wy22ZOT0rojnra0JOjT5s8P3BdwEXVqTNdIq3hhv6uops nZprQj3fvcB/boSsQDrQtzQ+eNgy6FUhe5+z7yU8lVl8orGxrzWgTUIlLwz7NW8Ha+7tcjqi 7cXcc/Ga46Zl+wVBK4VlMWlHaNOXd0OqvcdDmybW28PbU61NP7+4ur93nskZct1qGi87oOzZ +EkoWq4YsCVrr9oal0JZYUjs4tMbtHwUFd4PY1Jj8uNEsZQlwxBtebI+9vGwb+hqX+3bYGXR 2XVRGZNqhwXjNsaLnXcsYHVy/pAh9Fj/s9r2SzXKqOeaVTOGU095R4oITbxcGoKrNfLfzLD+ a5MDAAA= X-CMS-MailID: 20231018101516epcas5p2ac132e21cc9f83edd819c7680a51487d X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----.DGRwfvtDKQaTon4q7jBZTz_rY-uYfv-SaOoriR32EfX1D_r=_12cae_" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230920081458epcas5p3a3e12d8b5661b5d6f4420316630b02e1 References: <20230920080756.11919-5-nj.shetty@samsung.com> <20230920080756.11919-1-nj.shetty@samsung.com> <20230922130815epcms2p631fc5fc5ebe634cc948fef1992f83a38@epcms2p6> <20230926100718.wcptispc2zhfi5eh@green245> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 18 Oct 2023 06:32:09 -0700 (PDT) ------.DGRwfvtDKQaTon4q7jBZTz_rY-uYfv-SaOoriR32EfX1D_r=_12cae_ Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Disposition: inline On 26/09/23 03:37PM, Nitesh Jagadeesh Shetty wrote: >>>+                write_bio->bi_iter.bi_size = chunk; >>>+                ret = submit_bio_wait(write_bio); >>>+                kfree(write_bio); >> >>blk_mq_map_bio_put(write_bio) ? >>or bio_uninit(write_bio); kfree(write_bio)? >> >>hmm... >>It continuously allocates and releases memory for bio, >>Why don't you just allocate and reuse bio outside the loop? >> > >Agree, we will update this in next version. > Reusing the bio won't work in cases where the bio gets split. So we decided to keep the previous design. Thank you, Nitesh Shetty ------.DGRwfvtDKQaTon4q7jBZTz_rY-uYfv-SaOoriR32EfX1D_r=_12cae_ Content-Type: text/plain; charset="utf-8" ------.DGRwfvtDKQaTon4q7jBZTz_rY-uYfv-SaOoriR32EfX1D_r=_12cae_--