Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp666574pxb; Thu, 17 Feb 2022 12:01:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjZaHJfsBxrAA9VPptGhUEXKCd0GLJJutYXt7A2qZGLm3j8bhzhY0JsRerUVq+Tbxixyee X-Received: by 2002:a17:902:cf0d:b0:14d:af4c:b1d2 with SMTP id i13-20020a170902cf0d00b0014daf4cb1d2mr4251009plg.146.1645128097667; Thu, 17 Feb 2022 12:01:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645128097; cv=none; d=google.com; s=arc-20160816; b=RyfruH2vnEBez9sVU6EalI3rHMmZYNKBDJ4EpotHakmlv7fZ2PHPrkOvCgyl+Sgxcm KFFxjLL+UXjphx+EyxBpj1d0bEVYogChCX/fM8qVm1O2e/UkJCZvJW1CEQmWtkqb26qI arihp7Q8cT9QZEO5oz5dPdiHVWrZ+AJqFPnY1a7Th3HflNJt5kwROKw3mX6sPIT7zP07 uCk77gbGSqMGCacRnFds28kjgdethyRW0IFa9ux1wfx4o3vHFLX+KqJpsuiXlL8quUcv qpsU0MggNoPgPO5xZHkCEfOPAiR3z4MVjzUMWix26raLtwuai17nblWAS8CH6ttws3fh 13Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1zFqRS7lGsUI9447tPjr+UyxcPBpVVJrIYKaMONuEZQ=; b=SkpcnGa1zwx9mA9x3yUV+Uu/r7Q44faWAV+DBRB6/AKC6uucfwRivShbgywQ74xL6w AUtIlrgoj1FFirTGkUiRzaUhsrxEmQS0Lxc1j25X/qQPDs6cokqwaFp3KDlaZqF2VrpS sGj9VkKOHidL5Sj9ga30dZuZul2kgVVD0pZRSchd/kgDEMMwgOwjBSFpEf9DTjTAVrBJ edkBiw5Rg3j3KtFyDFH2rpCCRm7Z/oke/v342queCDX62FasElRbJ31tsCAanMSFfbei YmjVZU58AOC3yP8YkQQTg2E+DPGL2QIoyofd+p6A7cKK2G3wateHhg+jFkObWu9Ae8cc OT3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ewn0IO8W; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q14si4535134pgt.861.2022.02.17.12.01.20; Thu, 17 Feb 2022 12:01:37 -0800 (PST) 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=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ewn0IO8W; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240608AbiBQRuL (ORCPT + 99 others); Thu, 17 Feb 2022 12:50:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:48586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237904AbiBQRuJ (ORCPT ); Thu, 17 Feb 2022 12:50:09 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74152291FBF; Thu, 17 Feb 2022 09:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=1zFqRS7lGsUI9447tPjr+UyxcPBpVVJrIYKaMONuEZQ=; b=ewn0IO8WBPwCjs00l2ERqN87rx TnPixZQ79w+f2vyXxPD272rHyYhd4n34SnMTkkaAc1lF2qb29ZnhRYcjDLxXkLbhjovlJEeY+ptmq VZUqXNYiMoayFdyqZ/ViOfBwX7Ox/aNAhjSrXbYukmlqJacF3N2uVBdv8r09orglvU0dCQa0Fr+A5 lO8Uwv4d3zVKyGthoyN2N4Yn+Atj0F6UAmYuAIFISPxnEbFrbqkak4B3h38opGuCzUCHTOSZyxk1d W6UpYIhwPlgCj9UIURHoiqFAuVPN48BRGsOQljMpo9QxPUnxEq/a6tFKqKHXjgBsK0pmxFKtl2UFC vJAM1VDw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKkua-00BdTP-0U; Thu, 17 Feb 2022 17:49:48 +0000 Date: Thu, 17 Feb 2022 09:49:47 -0800 From: Luis Chamberlain To: Chaitanya Kulkarni Cc: "hch@lst.de" , "javier@javigon.com" , "linux-block@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "dm-devel@redhat.com" , "linux-nvme@lists.infradead.org" , "linux-fsdevel@vger.kernel.org" , "axboe@kernel.dk" , "msnitzer@redhat.com" , "bvanassche@acm.org" , "martin.petersen@oracle.com" , "hare@suse.de" , "kbusch@kernel.org" , "Frederick.Knight@netapp.com" , "osandov@fb.com" , "lsf-pc@lists.linux-foundation.org" , "djwong@kernel.org" , "josef@toxicpanda.com" , "clm@fb.com" , "dsterba@suse.com" , "tytso@mit.edu" , "jack@suse.com" , "joshi.k@samsung.com" , "arnav.dawn@samsung.com" , "nitheshshetty@gmail.com" , SelvaKumar S , Alasdair Kergon , Mike Snitzer , Sagi Grimberg , James Smart , Alexander Viro , "linux-kernel@vger.kernel.org" , Nitesh Shetty Subject: Re: [PATCH v3 02/10] block: Introduce queue limits for copy-offload support Message-ID: References: <20220214080002.18381-1-nj.shetty@samsung.com> <20220214080002.18381-3-nj.shetty@samsung.com> <20220217090700.b7n33vbkx5s4qbfq@garbanzo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,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 On Thu, Feb 17, 2022 at 10:16:21AM +0000, Chaitanya Kulkarni wrote: > On 2/17/22 1:07 AM, Luis Chamberlain wrote: > >> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > >> index efed3820cbf7..792e6d556589 100644 > >> --- a/include/linux/blkdev.h > >> +++ b/include/linux/blkdev.h > >> @@ -254,6 +254,13 @@ struct queue_limits { > >> unsigned int discard_alignment; > >> unsigned int zone_write_granularity; > >> > >> + unsigned long max_hw_copy_sectors; > >> + unsigned long max_copy_sectors; > >> + unsigned int max_hw_copy_range_sectors; > >> + unsigned int max_copy_range_sectors; > >> + unsigned short max_hw_copy_nr_ranges; > >> + unsigned short max_copy_nr_ranges; > > > > Before limits start growing more.. I wonder if we should just > > stuff hw offload stuff to its own struct within queue_limits. > > > > Christoph? > > > > Potentially use a pointer to structure and maybe make it configurable, Did you mean to make queue limits local or for hw offload and make that a pointer? If so that seems odd because even for hw copy offload we still need the other limits no? So what I meant was that struct queue_limits seems to be getting large, and that hw copy offload seems like an example use case where we should probably use a separate struct for it. And while at it, well, start adding kdocs for these things, because, there's tons of things which could use kdoc love. > although I'm not sure about the later part, I'll let Christoph decide > that. Luis