Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp494279lqs; Tue, 5 Mar 2024 07:52:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXZu7IDk97WggdZGi1SVl4QlxtEaZdpK1rVtk/zI7pfJpchfQmSyTnphjNVZ/nRruDafnG11zMYvFjPY0K3JBfHKOLE1ZzNxh37sl5hvw== X-Google-Smtp-Source: AGHT+IH/mK3JfXh7IIy6MSbb5/NP7JXEi3J0Lu3KVGLQKZGNQE402kflb6ex2hmIrIdW7bZHFean X-Received: by 2002:a05:6102:162b:b0:472:6e92:dc9 with SMTP id cu43-20020a056102162b00b004726e920dc9mr2687129vsb.4.1709653938733; Tue, 05 Mar 2024 07:52:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709653938; cv=pass; d=google.com; s=arc-20160816; b=UCXONqEm5ziW8sFN5cklABJVRputEhnprjC/HQrJIvhz1m5odhVPq0xE1XMOgbTGm7 GCd3pp0ZealuN80tLRYxwoXKfYZblKFbJTRoBJ7Suq5iXactRbphuPyefzmS0dREfFlV Om20or4avP/BYg5bDsLll6MMg4rylEwwn3Qc7flD2O4geKmce5SKVZ4wJrOqnjXZNH+4 H6C9X1LulTK8L7mwLDu1XKVKr21DIxV7Ppnmj2RxoiQmYrbttIg3aBB1b7u9oIEq16Np qzlz3kqD4WCXMEYGTRa0UXyEQSRpFQn4Kg0bgy1mRaHOXqPrUOPhVKi5IGba1VIvjBxO eX4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=c5ZIjtn84+RGrKPpS181y3wEWWbDN+8mLamK+w2N/o4=; fh=WSlzejDWAi5qwrHzA7o1TgKVJOXAu8t+ZVCywa06fKg=; b=Alnx7pWgLF5ip7mgLQ+WHL1bZ7ay4buNGg0SAs33Kneww2xEmOMJa49OwMtVIr3RdX r4cQ1lsPvZKorNyC0d/6f68qpBopPRxX6bbpWUPR1pKAgxYSIwWnpb0dDDyNQH6ATOFN y+MFlVsz+m++qnNmtkL9WbbDzmQE+WZ9JlgfALsezXBZhLJtvXSj4oPl+ZExg4FhoQQe iROx5iWq6DqQt5qWbCwtLRPqa8I5cbNHl5EHexC9CS2P5boJVlVvF13A5+lHdjbffPP0 E9Pr1f5H32hzIBoluTBHCCOpDsMcumvPSVKqmDt6LJDk928aCk/XaqSa6D11Vr348dzy us6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fBoFlOhl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r1-20020a9f3481000000b007d9df04c2b1si1691379uab.226.2024.03.05.07.52.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 07:52:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fBoFlOhl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-92631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 69CDA1C217A0 for ; Tue, 5 Mar 2024 15:52:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCC5412837B; Tue, 5 Mar 2024 15:52:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fBoFlOhl" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF0948662F; Tue, 5 Mar 2024 15:52:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709653922; cv=none; b=Mthlzg0+4sEfDk8YvFYgVamTSh7Q+pajWz7+v3qbRiei7XRrPe95K2Wji8socdQt1oj1mtq+AgDuTwoB8sCoqYDgsp2xuFZrYn/tqZ2nQPg3jxeAX9BtjK6GohBibOd87ZOy2JT8OKBku2BscLBe5dPwkiRylX+YJv8PYKHY3bM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709653922; c=relaxed/simple; bh=pSqyVUiOhZxz9FIInEYMAmoXZWKPhnt0IQNLfQGtXOo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uyqkT9/OSIWgI6qYP/Z5nElVwgf3it2VvmtDIUUYDwUKrqSuy6rzQ/0f0r0dNVvNLYj8aomwtfMqROw93y+/JfdBbZ0yRpz1zMcUrBTzzNEkujCNbOidTHY8u6AVfTltr2a7guVcobezwQovA2Uv1tVHfryXDlNV1tCWmyQYfMs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fBoFlOhl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DB4CC433C7; Tue, 5 Mar 2024 15:51:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709653921; bh=pSqyVUiOhZxz9FIInEYMAmoXZWKPhnt0IQNLfQGtXOo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fBoFlOhlhaEkFpkwIhtzKscT84AMxoyIqH1ke1DoX3oTGvoYraBWWNLX9PB1wDsDX 8/jrkloUt7VxJU24ln5/zi811lztKw0pkpRiqC5TgWE3Z3l2yBlrPTsMwI7n+JTnPL cIBn53riFq9sACKU+PDs51snnPNJif2TZriANWE8lPNacPlZ3ZEjjBSL+Ajm8tvqj0 Xh39F7UKx8jqNW9DJE3CBRQ781zgONKaHkjALazRttLlPWK1iLUFRVRnO9bb0lDH+E AJgD1u7Xsepu7WvnlIDZLfAruLkrmiYG+GBGJiaH7MHjj517QXOLR7xfuwktrP6dWh 5IQc8QXtatQIw== Date: Tue, 5 Mar 2024 08:51:56 -0700 From: Keith Busch To: Leon Romanovsky Cc: Christoph Hellwig , Robin Murphy , Marek Szyprowski , Joerg Roedel , Will Deacon , Jason Gunthorpe , Chaitanya Kulkarni , Chaitanya Kulkarni , Jonathan Corbet , Jens Axboe , Sagi Grimberg , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-nvme@lists.infradead.org, kvm@vger.kernel.org, linux-mm@kvack.org, Bart Van Assche , Damien Le Moal , Amir Goldstein , "josef@toxicpanda.com" , "Martin K. Petersen" , "daniel@iogearbox.net" , Dan Williams , "jack@suse.com" , Leon Romanovsky , Zhu Yanjun Subject: Re: [RFC RESEND 16/16] nvme-pci: use blk_rq_dma_map() for NVMe SGL Message-ID: References: <016fc02cbfa9be3c156a6f74df38def1e09c08f1.1709635535.git.leon@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <016fc02cbfa9be3c156a6f74df38def1e09c08f1.1709635535.git.leon@kernel.org> On Tue, Mar 05, 2024 at 01:18:47PM +0200, Leon Romanovsky wrote: > @@ -236,7 +236,9 @@ struct nvme_iod { > unsigned int dma_len; /* length of single DMA segment mapping */ > dma_addr_t first_dma; > dma_addr_t meta_dma; > - struct sg_table sgt; > + struct dma_iova_attrs iova; > + dma_addr_t dma_link_address[128]; > + u16 nr_dma_link_address; > union nvme_descriptor list[NVME_MAX_NR_ALLOCATIONS]; > }; That's quite a lot of space to add to the iod. We preallocate one for every request, and there could be millions of them.