History

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.

Eran Ben Elisha committed 6 years ago

Commit d6945241 parent 5e619d72 files · +105 −39Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/mlx5/driver.h+1−1
@@ -541,7 +541,7 @@ struct mlx5_priv { · 540 unmodified lines
541 /* pages stuff */541 /* pages stuff */
542 struct mlx5_nb pg_nb;542 struct mlx5_nb pg_nb;
543 struct workqueue_struct *pg_wq;543 struct workqueue_struct *pg_wq;
544 struct rb_root page_root;544 struct xarray page_root_xa;
545 int fw_pages;545 int fw_pages;
546 atomic_t reg_pages;546 atomic_t reg_pages;
547 struct list_head free_list;547 struct list_head free_list;