Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp867484lqj; Mon, 3 Jun 2024 03:26:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUDzDeBzYYvL6KE3FavrNDTLQuLIVqSZsnL9oJdDmxlKAJU59gzMzOOTuAR1aCx3i8rqdMoEI9vhqR0Mleyt9ayPCQGonwHHNKpMC+afQ== X-Google-Smtp-Source: AGHT+IEPl/warfL8LRF2RC1CrmptYOwFutb6Wcgh+iz3jWeqwWTR/3meKr3TlYHrcbBBBxk84ct3 X-Received: by 2002:a17:906:644b:b0:a64:41ba:e7ee with SMTP id a640c23a62f3a-a682022b606mr668126766b.32.1717410418754; Mon, 03 Jun 2024 03:26:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717410418; cv=pass; d=google.com; s=arc-20160816; b=TvCxAG+fxNED5dzDtFEub+Pu5LdHeMxMBCwcKT7Z6rLUR63/nfqs6GjsBBm9pRDLti NFLGMI5RnNoZRIHk72mTiniYrbjz0OCFiulRicZmqOmW2TukAx1gZTm7mM7pJJKJ7cY5 u2S44oHME2z7aIhdwW2MOsTv/+FDgdLoaVfUi3563dQUDwe+POARa8OTcoCUKpL95l1Z 1AZSao17Hn3d9yTmFRd5aFkT3vgqpuKjl3rd+GabPuipqKNbllvHFPAd5FdOBkQqSaP3 QJN2/ahxpHH3eh70SVHC3NFwErhHqA24sV1iXywOCd3NACKXBBs7IJ99Lp6x3Su6THvY hMGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=QhbTfi29lbcGv2M6xeCPwRnd9Zjv7uV0OUfRs7ezA7I=; fh=kHBukJ0EU0Nvo2zhovP5VaMjUndK/jHZEaWCd+b4rsA=; b=FYuSLfh/b1mbN1GUyUWaRCqMSZPExGm2ckOJMhApKlA+ma0Paw3QIBAdulOkwiWKQr Jg99irE5qnMl4431wk1F7MC8US5HsuYpob/K395Gn6bzjdqcrX/vMjiRZ/STfzf1az0P Y+DRkxNveek4WoJD/GvpGMAXIObqEM7Dz4EjSbdazHyz/NqCk0/5vpTffU9fZJCNNsuk JRgzwzTSV/vJWn8kKecyJuHqs9P03PzmaZOF3YoVoXnYC74YXxPXgeBOuKwPDZXfbms4 rkreGQJHD/9gtZG/mz2U1FMMXdWFocjlDAGPvxoHbUOQ8xdPU6B2WxVBXvwMkTHExWdc lUZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=on5pBPWr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198974-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198974-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 a640c23a62f3a-a68beaa988asi245200466b.795.2024.06.03.03.26.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 03:26:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198974-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.org header.s=k20201202 header.b=on5pBPWr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198974-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198974-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7A6F31F211CC for ; Mon, 3 Jun 2024 10:26:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1B3882D62; Mon, 3 Jun 2024 10:26:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="on5pBPWr" 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 CD6427D3E8; Mon, 3 Jun 2024 10:26:47 +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=1717410407; cv=none; b=cFvigcicBEiitaSnudoX+qWHfa6Mw7n/CbW4f32UmXsY8hTxpSqlRBVIzrtzqMgpQv7BO9nGHNt2x1HqvsGxSbnJmSYhF4uOHWk8yP4dqnfk9my/aTGKezChKWXjkR0N9SfVoFa+7/9H2Xh3GilCh+BtA8igtJBJamobFbm7ocM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717410407; c=relaxed/simple; bh=YJXqCgio39gKKxptigF5PmqKBej+tn+kRnRb5LjmgpI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=E/+Wv3RBM8aB2MIWhDqT2Zz4/z/lZA3MNyK81+rtdEl/18GKYsH/3g3B+uDMqlU3PyxhBUUuZCf0aNEBrTEH021z/j2+myjaIrDQh1+x1JEhJ0vnPnKOwUHfS7VZ0tAwEPLKM9rXITjBOmIBW6UMw+BTA6JX5RMk3daC9MMjxkg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=on5pBPWr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F2F8C2BD10; Mon, 3 Jun 2024 10:26:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717410407; bh=YJXqCgio39gKKxptigF5PmqKBej+tn+kRnRb5LjmgpI=; h=From:To:Cc:Subject:Date:From; b=on5pBPWrA6eHtUZKwIDFR7JF+BZqxklml/MbfisQ7vXIQXZF2vB+mkm/8MwdPDi/9 pZ4XzDLi13ey4+qUYUNZyXmJxbIJjM3sF50MTNLFoU6joZK+r36Itg7mm01S04yAWL zVsbIk0RGkLiPkYTxuOPO62n3K0VOUwyoc5xmOJy2Zl87EK5AKOLVfu3zN/L3Cubl4 3endCE5ULIdkktkZRkhGmWUu1p85OBaDWjm+d49Bt4J3SqJQxX6ZGHv8m9rvt+Wdln jPJLa0GVQaVhWx+W3t8mOQdd6hA2OwAFmkTQflHOjt3Ww3nGLJRQcm/1kM0K86MLBK xM40zScI34agw== From: Leon Romanovsky To: Jason Gunthorpe Cc: Leon Romanovsky , Eric Dumazet , Jakub Kicinski , Jianbo Liu , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Paolo Abeni , Saeed Mahameed , Tariq Toukan Subject: [PATCH rdma-next 0/3] Delay mlx5_ib internal resources allocations Date: Mon, 3 Jun 2024 13:26:36 +0300 Message-ID: X-Mailer: git-send-email 2.45.1 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=UTF-8 Content-Transfer-Encoding: 8bit From: Leon Romanovsky Internal mlx5_ib resources are created during mlx5_ib module load. This behavior is not optimal because it consumes resources that are not needed when SFs are created. This patch series delays the creation of mlx5_ib internal resources to the stage when they actually used. Thanks Jianbo Liu (3): net/mlx5: Reimplement write combining test IB/mlx5: Create UMR QP just before first reg_mr occurs IB/mlx5: Allocate resources just before first QP/SRQ is created drivers/infiniband/hw/mlx5/main.c | 171 ++++--- drivers/infiniband/hw/mlx5/mem.c | 198 -------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 9 +- drivers/infiniband/hw/mlx5/mr.c | 9 + drivers/infiniband/hw/mlx5/qp.c | 20 +- drivers/infiniband/hw/mlx5/srq.c | 4 + drivers/infiniband/hw/mlx5/umr.c | 55 ++- drivers/infiniband/hw/mlx5/umr.h | 3 + .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/main.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/wc.c | 434 ++++++++++++++++++ include/linux/mlx5/driver.h | 11 + 12 files changed, 627 insertions(+), 291 deletions(-) create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/wc.c -- 2.45.1