aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorEran Ben Elisha <eranbe@mellanox.com>2020-05-18 11:13:52 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2020-07-28 02:37:26 -0700
commitd6945242f45d4745a8169fdab7afeb40f4e36f06 (patch)
tree9102a21069ba4b19970e27096d2cd130e1581060 /include/linux/mlx5/driver.h
parentnet/mlx4: Use fallthrough pseudo-keyword (diff)
downloadwireguard-linux-d6945242f45d4745a8169fdab7afeb40f4e36f06.tar.xz
wireguard-linux-d6945242f45d4745a8169fdab7afeb40f4e36f06.zip
net/mlx5: Hold pages RB tree per VF
Per page request event, FW request to allocated or release pages for a single function. Driver maintains FW pages object per function, so there is no need to hold one global page data-base. Instead, have a page data-base per function, which will improve performance release flow in all cases, especially for "release all pages". As the range of function IDs is large and not sequential, use xarray to store a per function ID page data-base, where the function ID is the key. Upon first allocation of a page to a function ID, create the page data-base per function. This data-base will be released only at pagealloc mechanism cleanup. NIC: ConnectX-4 Lx CPU: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz Test case: 32 VFs, measure release pages on one VF as part of FLR Before: 0.021 Sec After: 0.014 Sec The improvement depends on amount of VFs and memory utilization by them. Time measurements above were taken from idle system. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Reviewed-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to '')
-rw-r--r--include/linux/mlx5/driver.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 6a97ad601991..a0fcc4d13e93 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -541,7 +541,7 @@ struct mlx5_priv {
/* pages stuff */
struct mlx5_nb pg_nb;
struct workqueue_struct *pg_wq;
- struct rb_root page_root;
+ struct xarray page_root_xa;
int fw_pages;
atomic_t reg_pages;
struct list_head free_list;