Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp538834rwl; Wed, 29 Mar 2023 05:35:01 -0700 (PDT) X-Google-Smtp-Source: AKy350ZurR9b3IxKYucIZilG3crZWuI7a9fMZvtLayME22Otp5r4XSIIbi0Gp4hivLikfLYNetHa X-Received: by 2002:a17:906:951:b0:933:3cc7:4420 with SMTP id j17-20020a170906095100b009333cc74420mr19915262ejd.45.1680093301248; Wed, 29 Mar 2023 05:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680093301; cv=none; d=google.com; s=arc-20160816; b=eY3dFlOSAixFdThSXwPdPZ1X0kc6nbaaN4GylFfxCYPG5CsOQczAuoomgSmA7P0vkF Tjc4UyIVKJukeGMtf+91CxGnnSr6Cu1UUXztUzLU7SrCaoqMojgjaJ2UlVbZi/mMe9gy f0/oxpM2DJTkHqcXTH/qenoq5kIo/cwK7+4UXAE6XRJ6Ybl1h8NdumIS6PRS3fafl0r0 VX6d2QaJagYQAlkTO4Q4Oy6PT1fRzvDFpM+uVrN4jRupz6NQTbVzYoPvhg1Mj+tV5nkg LceQ/LJPR+44dSNLpnxHwjEmx9kRlukVBpcce41XlKK29JdrAeI9sTHEGCUAItriyArW SnpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature :wdcironportexception:ironport-sdr:ironport-sdr:dkim-signature; bh=zZpIXnR6BfGKRbl9KEHqRv70dkgTytr1OorJZaZXWbQ=; b=glXbV5tDy/vtjDM9gkcKkHSlUH/kyGFzq3/+b36NWtyrf+xzTlCxmQ8/9kE4CNMy3F MWo57nF3XRIusHokQznZ3pQQHcYVSnQYq2pOfnxQTPn/flavEmaBCh/6YsJ3ptDo0zRs D7bvIlzUcc8Rg0J+Y4801i2JI3Y9R/uxn3aj25ODfP52cNyO6xJUXUydUuEDqbMWr2hA W/jeCAXnpmu/mBELVxOYGu9Kp9qM38ndbqkoVzOocLSLTMHHl9im9X4559szmg6wcFma 4cDF4XcZRs2D0zqPr7ioDzne/84zpWp10XCnFXAuSXUOMl94oITTZ50hXEib29xZh+bB gwTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=FInUpywG; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b="aYJDL/Wv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xd3-20020a170907078300b0093397c2c553si32145204ejb.289.2023.03.29.05.34.35; Wed, 29 Mar 2023 05:35:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=FInUpywG; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b="aYJDL/Wv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbjC2MYW (ORCPT + 99 others); Wed, 29 Mar 2023 08:24:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbjC2MYU (ORCPT ); Wed, 29 Mar 2023 08:24:20 -0400 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF9041FDB for ; Wed, 29 Mar 2023 05:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1680092659; x=1711628659; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=2dcvqV87tiaXbc2Uo11d6o/I39/nMjI+zlAAi+6Vbgk=; b=FInUpywGyCiBZ6lwRYU4XU5nYC1tlOTMbua079aS+TrqsJQpeTgsh66b Dfy+f95QPCSCIrm+lQNLb8pCo1FV1ChqP4TK8gPc5XP/yd6hharfeAsDi HMjfwS66jpiH/NkyJctfUnUIMCCUdZMPiwmyZy7pPlPAlxz3nKM+GUAI+ XbF4el7WN3vy9zMnjRa5ifT/2Um27T933/Flbq1vALOI5wu9PcipGVFO7 0dGu+AQOdMzO0v9NIQgx3drTA942A1r/NOz6co1rORmsC2NDqGy6rE/Kh Tv54hPksKwo+cqkK/jNFa8QXQ/FiqiBNCsvgqrWJZcZcLVWmsg+XCDvDR w==; X-IronPort-AV: E=Sophos;i="5.98,300,1673884800"; d="scan'208";a="231763314" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 29 Mar 2023 20:24:19 +0800 IronPort-SDR: nHF0vERJcNn095vMdQeaMZ1UyAnytNlUdIj7IU/0sqp4xPrsdlvAizYrjpd2VW+0pD+BiJyy81 wGCPzGXU/PtRdc12DeICoY1TWGkY7ymWp00ZBEfvHlObKFBrbZecAwb/wr32LuGbWUwHXh0R+6 lZyoxpFtPt6J4h0oKMr87Tkf3tY7LBoSGQme5edxQl9M2FZdMkkMDnqRdlhjyo7io0QHP9UJkS 3VUQkM5WQS872s8XVlFf7T1jLzw9hc2c/DMGAM0VoFCoQx7NjxK5DFt5kaELZk2LyOPg7m+eLW pPA= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 29 Mar 2023 04:40:28 -0700 IronPort-SDR: 6aq29CGTefEAPaMBNfglIGMxtuPZFqnCwNLWi5Q6hqwTG/U7AXA++IR0GrCqeBgrbRImqXxlkz u0AjFNgA5bjd2i8XDsMmi+GwAm6E21Yw2U9/MyjNKnUoG3MibtdjLwsYkC7j6aMhY01LiQYHCj Q6XPe6oRriLkWnJrZLlfoIdr6b7WTMTjNBrYUHbcNPV2ynZ6lkn2QrunBFJx9G7LdnJ1Kuc/SO Tkw2aZicwCeQPxBCauUlq/6E1jJxBjyhikkh2abV/gHOaBU2lX0kYC0QZauwcCxQMes3PHc21W dWQ= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 29 Mar 2023 05:24:19 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4Pmm2B5R06z1RtW1 for ; Wed, 29 Mar 2023 05:24:18 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1680092657; x=1682684658; bh=2dcvqV87tiaXbc2Uo11d6o/I39/nMjI+zlA Ai+6Vbgk=; b=aYJDL/Wv2IOTx8UdzJQy6vhK6Cwx6WbFawjWCYauh4DMUjt8PUN 9x0lBBLgBT/IjyJZGV1IULqpb87tc8FlfO62FSSzocE5VAR0WX6HRUoEfOG+mAEG rS94t5CfBpzIdV/6jIaxzIRNmFgSzvpryU3Z3Hgv220Wql3f6LJqko6ekzg49x+7 qeUNMP4r4fsY+rjt2ddmQ5DpVwco7it1Uwnyd0bFSBOYjcGo49ZkFsBrbmu/9pYw AfMs3umVUAn9mMkkU82WMd1B4ReuDbvk0vLFAQHC/dPMQD3ZYGm0zN4Yjco6S7g1 yw6PpaghAYhqlgVGMdPjU7T3BSfmuLdDP4g== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 14movKifG6Bt for ; Wed, 29 Mar 2023 05:24:17 -0700 (PDT) Received: from [10.225.163.116] (unknown [10.225.163.116]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4Pmm253ydnz1RtVm; Wed, 29 Mar 2023 05:24:13 -0700 (PDT) Message-ID: <03c647ff-3c4f-a810-12c4-06a9dc62c90e@opensource.wdc.com> Date: Wed, 29 Mar 2023 21:24:11 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v8 1/9] block: Introduce queue limits for copy-offload support Content-Language: en-US To: Nitesh Shetty Cc: Anuj Gupta , Jens Axboe , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Keith Busch , Christoph Hellwig , Sagi Grimberg , James Smart , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , bvanassche@acm.org, hare@suse.de, ming.lei@redhat.com, joshi.k@samsung.com, nitheshshetty@gmail.com, gost.dev@samsung.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org References: <20230327084103.21601-1-anuj20.g@samsung.com> <20230327084103.21601-2-anuj20.g@samsung.com> <20230329104142.GA11932@green5> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20230329104142.GA11932@green5> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/29/23 19:41, Nitesh Shetty wrote: >>> +What: /sys/block//queue/copy_max_bytes >>> +Date: November 2022 >>> +Contact: linux-block@vger.kernel.org >>> +Description: >>> + [RW] While 'copy_max_bytes_hw' is the hardware limit for the >>> + device, 'copy_max_bytes' setting is the software limit. >>> + Setting this value lower will make Linux issue smaller size >>> + copies from block layer. >> >> This is the maximum number of bytes that the block >> layer will allow for a copy request. Must be smaller than >> or equal to the maximum size allowed by the hardware indicated > > Looks good. Will update in next version. We took reference from discard. > >> by copy_max_bytes_hw. Write 0 to use the default kernel >> settings. >> > > Nack, writing 0 will not set it to default value. (default value is > copy_max_bytes = copy_max_bytes_hw) It is trivial to make it work that way, which would match how max_sectors_kb works. Write 0 to return copy_max_bytes being equal to the default copy_max_bytes_hw. The other possibility that is also interesting is "write 0 to disable copy offload and use emulation". This one may actually be more useful. > >>> + >>> + >>> +What: /sys/block//queue/copy_max_bytes_hw >>> +Date: November 2022 >>> +Contact: linux-block@vger.kernel.org >>> +Description: >>> + [RO] Devices that support offloading copy functionality may have >>> + internal limits on the number of bytes that can be offloaded >>> + in a single operation. The `copy_max_bytes_hw` >>> + parameter is set by the device driver to the maximum number of >>> + bytes that can be copied in a single operation. Copy >>> + requests issued to the device must not exceed this limit. >>> + A value of 0 means that the device does not >>> + support copy offload. >> >> [RO] This is the maximum number of kilobytes supported in a >> single data copy offload operation. A value of 0 means that the >> device does not support copy offload. >> > > Nack, value is in bytes. Same as discard. Typo. I meant Bytes. Your text is too long an too convoluted, so unclear. -- Damien Le Moal Western Digital Research