Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp508284lqs; Tue, 5 Mar 2024 08:10:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVQrbApBZ6Ir/CxkL2NLxV+w/FqoglpuK8k78mbdRnBAfVLZN3enCm7Vhse8JSpnxygc0IpEUM6uoJbfTjHJx8jqLg5LGSJhCCIN3B3+g== X-Google-Smtp-Source: AGHT+IH8L9yhqY/IvruJDxv1UviNlwyLhAgjNFU4m/Rm9+PRxPE8k8+DMGhBPQVxnaK/LA/XzXTb X-Received: by 2002:a50:cc46:0:b0:565:edb8:7dc0 with SMTP id n6-20020a50cc46000000b00565edb87dc0mr7916979edi.9.1709655001889; Tue, 05 Mar 2024 08:10:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709655001; cv=pass; d=google.com; s=arc-20160816; b=QGc1obHz9A3RM6oZGCoxeQDYoZyOql26vFtpEfcQsWGTqdlBqgfDlbr6/nsiqa4CaW 6MxVD1Uny0ynXXJ0DS2RUNzyClmelXLL7BCPl06Q+8rH55Xvz8SeEYC1th0iapaAaJWm 0QeVUhYQIRx7wdO0xyvrGUADxG5Qu8H6W16OaIEiwQTnRbEUrCKmd18oRa+P4adjBsz+ wlPT+57h7t657OZ5bm03zcr/Tb3YVelLVnj/9DuNqWCn+R/XIaL9VTlLDPY2vBdCqt96 QepqiUAj2Uyr+pspqSZH7jOyQ+RiCh5BcZT/zyOU5gxhiV8FXZKkzmgfz0pHGXrvzqE5 idQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ySXwHaWnwWfuqJedGiV+eti2ui1J2NF0RPAqqwKPf6w=; fh=ZXIWmm6OJ7KjUkO9wjh/x8bsWOxp9vRsXZflrpk/0X0=; b=MXkTOQVT2gUb8GEZGEjHOaz+osWncctnzqWdVO0UVb8n7dTDFyGvKIBjD8tuR/+Bk4 nDTyS4gtzDk5/WbR5tfLr/uNrvOHpw/34LuZU0pxUvFe/7/iMkoOCXV1eRo8WAWhtX/I eHaShiyQfmfqdPSkPPo4W3XG2BSI4i28M0Sj1fSophrIxvZn8nohIxzWuTE6eWiw7w9y PCf/DuyXCf8/DCxbBkX9/Q7y5EZiFy8OTx1+yNMv/E5crHhUcPwA7LRS6aHpqsZvtkAK KQxLVVbvFVxLRIeKGMtPaCnKGPmYK6qD8roGNbyQK/9G/EtgMEEOoIF8wFFVq9am1J+8 olVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=hmazYmkH; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-92657-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92657-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x34-20020a50baa5000000b00564f04e4347si5177816ede.203.2024.03.05.08.09.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 08:10:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92657-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=hmazYmkH; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-92657-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92657-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5DEC81F261A7 for ; Tue, 5 Mar 2024 16:09:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 98AFA1292CB; Tue, 5 Mar 2024 16:08:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="hmazYmkH" Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1276F128382 for ; Tue, 5 Mar 2024 16:08:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709654930; cv=none; b=KVEKZs2HWMZ6+Kbe7+xkpnSr2Kw1nq6TNYuy0RGUTr/yGxMOoctLDGr9ChpviT5cDscz6GluYfm2g9JE7lVz1cQ+zoAtWUx8FCkE0BzZFs56Oy0BDXtPiWzrAyEFw9XeEiSe6Ms0NjOs2KepI0K53oRpjwLWfWOvuKGdIzwUzp0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709654930; c=relaxed/simple; bh=mIBe9C22FxWEWX02cGhRxqJ/jUNOmxYaoZIj+zD5bao=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=i01C24A3+FgGu3Reox25kfJB+xiwouSfvrPmHmiLCihhKeYXcv42OQM2VqMaSOKFhmO6GWwLuclyV9syn+eFr2XBrQ0A3HqDXtxTfHIDMoDtctmxBPyC7nQFR7z9CDM1qZn3et0My7jfI52KkfHm4uVYz3CF0Odb65JB9QukpQA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=hmazYmkH; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1dcc0d163a1so17925215ad.0 for ; Tue, 05 Mar 2024 08:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1709654927; x=1710259727; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ySXwHaWnwWfuqJedGiV+eti2ui1J2NF0RPAqqwKPf6w=; b=hmazYmkH3PU97SiAUWQgGfr/d2lXJ0nay8shW5ZTghl0bVuqeGdhxSLhftkcCNMpGX 2yLfxdQ7BIisIbtHJUCeWByMYRSZE1NPbd9JCvXlgKTEeyrkHnY6go8F5W+3hYlnNrL3 KXI0uFQjdLf/bZiPZG5jwonjigRJNxDUy2FLUuH2Cb8+hf9L/EtHL8r8pKebaebvL/Ho S/PNIsvkB5y4GTT3Y9/PNARoambMRA53gyzpDku/oqtnsb2zQ29RsZS/pCbES7hzNJ8K bqMrfm7B1UQCfdkgofIfGr5iA/jCaTDjgT9AHV+vSPvLH3rYIlCoXDVnmpQkkkYTm8UK 5doA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709654927; x=1710259727; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ySXwHaWnwWfuqJedGiV+eti2ui1J2NF0RPAqqwKPf6w=; b=VlI4ILyOVMPiJPj5RR6Jikdf34LCIOTfTZmC1v5zCutxamYS01tPf/cGAVh210rRON aWt+1vtKisz8Zlcl1ez8tOhWtYNDtDttiw8ySvuxvaLur1X7pFPIp+Py3RGx0dNAGMyd YGfIJq2wwmq34djTzpvNli/mP+Z4FpSAKflU913i3Vo13r1c+q/JfXCnYOqsFB4Pj6Jy OWjwkWrJNi0TzfGNrm5iqc7f0zCRNFWm33YkWsQDgwvQZf2jp2qUhG/zScLAwxEfgLBg 6sx0TgLrz7XAYKD2/edi206ekLB5H3c7/yORsNi1sU7ABYD5kKtf8u7z+BQK9fi2J0xD 2gbA== X-Forwarded-Encrypted: i=1; AJvYcCUPGzkP7WxTets5SKs1XO9NAW7TxmbQsuG2j69xwl93i/v0U4xM7WWfsWX3PR7LcCPA5cLn7n2Cxcemp7WJ80m5BGr+tpWYXzeH/Wr5 X-Gm-Message-State: AOJu0YzrzOXNb9wFLvAUII0dwnM0m4fK+tPYG/VcuBtBPqx7/VfQU+el r11hHo/8rfpgj4dZ18wRL++YAF8paUb5jYwex3KU8AQP3TAZ1+A3Qw12B0EtW6w= X-Received: by 2002:a17:902:b08b:b0:1dc:82bc:c072 with SMTP id p11-20020a170902b08b00b001dc82bcc072mr977677plr.1.1709654927270; Tue, 05 Mar 2024 08:08:47 -0800 (PST) Received: from [192.168.1.150] ([198.8.77.194]) by smtp.gmail.com with ESMTPSA id b4-20020a170902d50400b001dcf93e90a0sm6901815plg.20.2024.03.05.08.08.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Mar 2024 08:08:46 -0800 (PST) Message-ID: <06787e6a-4e78-4524-960d-ec24b9f38191@kernel.dk> Date: Tue, 5 Mar 2024 09:08:43 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC RESEND 16/16] nvme-pci: use blk_rq_dma_map() for NVMe SGL Content-Language: en-US To: Keith Busch , Leon Romanovsky Cc: Christoph Hellwig , Robin Murphy , Marek Szyprowski , Joerg Roedel , Will Deacon , Jason Gunthorpe , Chaitanya Kulkarni , Chaitanya Kulkarni , Jonathan Corbet , Sagi Grimberg , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , 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 References: <016fc02cbfa9be3c156a6f74df38def1e09c08f1.1709635535.git.leon@kernel.org> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/5/24 8:51 AM, Keith Busch wrote: > 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. Yeah, that's just a complete non-starter. As far as I can tell, this ends up adding 1052 bytes per request. Doing the quick math on my test box (24 drives), that's just a smidge over 3GB of extra memory. That's not going to work, not even close. -- Jens Axboe