Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9216331rwp; Thu, 20 Jul 2023 01:04:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlFwHbyTh4v1HNBwE5NduiOYqhLCICirsYDStE5NYqpzyZiEQSujcnf+uQWsVuFda6QapmFF X-Received: by 2002:a17:902:ec8c:b0:1b9:dea2:800f with SMTP id x12-20020a170902ec8c00b001b9dea2800fmr5283807plg.8.1689840273797; Thu, 20 Jul 2023 01:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689840273; cv=none; d=google.com; s=arc-20160816; b=zrtCHFSc/ODhW2oqu0qBTWL+ApC/okGRkNkFD8EC4oDwpye292b1UV+AiXQFq6fJ1o EgVTWAvjyriYHjaYxHpG0323qi9VmikNFS31XJcy15sDbYG/TObfn0MV6K08qYB6t/4i Y778UNcb7Ui8Q7TfvHza4FtohQGBotMhAZhoLLzeu9mpt6gMWtwZfSe+pDEvrPwA/7lU MNBn2pY5g0NtutVPgGtu//HYwkW/dG9OHyR62kYj8y6I60SF2DCmk1PIMa9kUG3S6JXN 72jnXZ+lX7UBDdh5vkPOGrNfp3Nbk8v6JVQ/Pd6eLP+mGC671/Egkdcn1v2Ir+UO54DR s6vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=JA5SXRPA542vGqllBWOTAbqsID3ErsYVcZI5Ced2v6c=; fh=vhIoJ29ohhquC1HqCwNn+IPM05SEcv/tM48DwFvn19U=; b=d7lZKvQdzX2hn4yce/YWBlx3b/FBOKOIhh4ZtEtS2b6n+7HI9vveki5iITscNGLXDj V10qCfRZfvwxZ719fC24o2Eki9ms/3FevHwWn2q8ogRv4wkbIAs/HCtHT7WFj2tqm+QF F1qNys23jK9nQfuyxFyAECvyO2klm9kJYl7nQuXpMoKKgiwx7jBGPaZaWeZTfsy21Nr4 4PoNOf+yHW9kdfk+2tYUTTPz7Ly4BaHfETST0bVXxxxynwq8StbIHnwKr2RKpkhgu4L4 KesBzd83i2nNbxC5IYV0mRQB1/NU65ToQKOPRINgoPd0vcbVPtsoFYGK8ZB1eV0373gF KLng== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lc15-20020a170902fa8f00b001b6aeea4a58si448935plb.53.2023.07.20.01.04.21; Thu, 20 Jul 2023 01:04:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231515AbjGTHGj (ORCPT + 99 others); Thu, 20 Jul 2023 03:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231445AbjGTHGT (ORCPT ); Thu, 20 Jul 2023 03:06:19 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A604271E; Thu, 20 Jul 2023 00:06:17 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 5F0616732D; Thu, 20 Jul 2023 09:06:12 +0200 (CEST) Date: Thu, 20 Jul 2023 09:06:12 +0200 From: Christoph Hellwig To: Nitesh Shetty 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, willy@infradead.org, hare@suse.de, djwong@kernel.org, bvanassche@acm.org, ming.lei@redhat.com, dlemoal@kernel.org, nitheshshetty@gmail.com, gost.dev@samsung.com, Kanchan Joshi , 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 v13 1/9] block: Introduce queue limits for copy-offload support Message-ID: <20230720070612.GA4722@lst.de> References: <20230627183629.26571-1-nj.shetty@samsung.com> <20230627183629.26571-2-nj.shetty@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230627183629.26571-2-nj.shetty@samsung.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Just a little heads up: I think we need to properly solve the hw vs user limit as the various ad-hoc mechanisms tend to be broken and don't scale. I plan to start looking into that the next days. On Wed, Jun 28, 2023 at 12:06:15AM +0530, Nitesh Shetty wrote: > Add device limits as sysfs entries, > - copy_offload (RW) > - copy_max_bytes (RW) > - copy_max_bytes_hw (RO) > > Above limits help to split the copy payload in block layer. > copy_offload: used for setting copy offload(1) or emulation(0). > copy_max_bytes: maximum total length of copy in single payload. > copy_max_bytes_hw: Reflects the device supported maximum limit. Why do we need the separate copy_offload boolean vs just looking at the max_bytes value?