All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next v7 0/6] RDMA/rxe: Replace mr page map with an xarray
@ 2023-01-19 23:59 Bob Pearson
  2023-01-19 23:59 ` [PATCH for-next v7 1/6] RDMA/rxe: Cleanup mr_check_range Bob Pearson
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Bob Pearson @ 2023-01-19 23:59 UTC (permalink / raw)
  To: jgg, zyjzyj2000, leonro, yangx.jy, lizhijian, linux-rdma; +Cc: Bob Pearson

This patch series replaces the page map carried in each memory region
with a struct xarray. It is based on a sketch developed by Jason
Gunthorpe. The first five patches are preparation that tries to
cleanly isolate all the mr specific code into rxe_mr.c. The sixth
patch is the actual change.

v7:
  Link: https://lore.kernel.org/linux-rdma/Y8f53jdDAN0B9qy7@nvidia.com/
  Made changes requested by Jason to return RESPST_ERR_XXX from rxe_mr.c
  to rxe_resp.c.
v6:
  Backed out.
v5:
  Responded to a note from lizhijian@fujitsu.com and restored calls to
  is_pmem_page() which were accidentally dropped in earlier versions.
v4:
  Responded to a comment by Zhu and cleaned up error passing between
  rxe_mr.c and rxe_resp.c.
  Other various cleanups including more careful use of unsigned ints.
  Rebased to current for-next.
v3:
  Fixed an error reported by kernel test robot
v2:
  Rebased to 6.2.0-rc1+
  Minor cleanups
  Fixed error reported by Jason in 4/6 missing if after else.


Bob Pearson (6):
  RDMA/rxe: Cleanup mr_check_range
  RDMA/rxe: Move rxe_map_mr_sg to rxe_mr.c
  RDMA-rxe: Isolate mr code from atomic_reply()
  RDMA-rxe: Isolate mr code from atomic_write_reply()
  RDMA/rxe: Cleanup page variables in rxe_mr.c
  RDMA/rxe: Replace rxe_map and rxe_phys_buf by xarray

 drivers/infiniband/sw/rxe/rxe.h       |  38 ++
 drivers/infiniband/sw/rxe/rxe_loc.h   |  12 +-
 drivers/infiniband/sw/rxe/rxe_mr.c    | 605 ++++++++++++++------------
 drivers/infiniband/sw/rxe/rxe_resp.c  | 143 ++----
 drivers/infiniband/sw/rxe/rxe_verbs.c |  36 --
 drivers/infiniband/sw/rxe/rxe_verbs.h |  32 +-
 6 files changed, 425 insertions(+), 441 deletions(-)


base-commit: 1ec82317a1daac78c04b0c15af89018ccf9fa2b7
-- 
2.37.2


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH for-next v7 6/6] RDMA/rxe: Replace rxe_map and rxe_phys_buf by xarray
@ 2023-02-07  8:03 ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2023-02-07  7:53 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230119235936.19728-7-rpearsonhpe@gmail.com>
References: <20230119235936.19728-7-rpearsonhpe@gmail.com>
TO: Bob Pearson <rpearsonhpe@gmail.com>

Hi Bob,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on 1ec82317a1daac78c04b0c15af89018ccf9fa2b7]

url:    https://github.com/intel-lab-lkp/linux/commits/Bob-Pearson/RDMA-rxe-Cleanup-mr_check_range/20230120-080520
base:   1ec82317a1daac78c04b0c15af89018ccf9fa2b7
patch link:    https://lore.kernel.org/r/20230119235936.19728-7-rpearsonhpe%40gmail.com
patch subject: [PATCH for-next v7 6/6] RDMA/rxe: Replace rxe_map and rxe_phys_buf by xarray
:::::: branch date: 3 weeks ago
:::::: commit date: 3 weeks ago
config: s390-randconfig-m041-20230206 (https://download.01.org/0day-ci/archive/20230207/202302071553.dxgzoPxM-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>

smatch warnings:
drivers/infiniband/sw/rxe/rxe_mr.c:130 rxe_mr_fill_pages_from_sgt() warn: inconsistent returns '&((&xas)->xa)->xa_lock'.

vim +130 drivers/infiniband/sw/rxe/rxe_mr.c

02ea0a511558c9 Li Zhijian  2022-12-06   98  
3222da9099ca42 Bob Pearson 2023-01-19   99  static int rxe_mr_fill_pages_from_sgt(struct rxe_mr *mr, struct sg_table *sgt)
3222da9099ca42 Bob Pearson 2023-01-19  100  {
3222da9099ca42 Bob Pearson 2023-01-19  101  	XA_STATE(xas, &mr->page_list, 0);
3222da9099ca42 Bob Pearson 2023-01-19  102  	struct sg_page_iter sg_iter;
3222da9099ca42 Bob Pearson 2023-01-19  103  	struct page *page;
3222da9099ca42 Bob Pearson 2023-01-19  104  	bool persistent = !!(mr->access & IB_ACCESS_FLUSH_PERSISTENT);
3222da9099ca42 Bob Pearson 2023-01-19  105  
3222da9099ca42 Bob Pearson 2023-01-19  106  	__sg_page_iter_start(&sg_iter, sgt->sgl, sgt->orig_nents, 0);
3222da9099ca42 Bob Pearson 2023-01-19  107  	if (!__sg_page_iter_next(&sg_iter))
3222da9099ca42 Bob Pearson 2023-01-19  108  		return 0;
3222da9099ca42 Bob Pearson 2023-01-19  109  
3222da9099ca42 Bob Pearson 2023-01-19  110  	do {
3222da9099ca42 Bob Pearson 2023-01-19  111  		xas_lock(&xas);
3222da9099ca42 Bob Pearson 2023-01-19  112  		while (true) {
3222da9099ca42 Bob Pearson 2023-01-19  113  			page = sg_page_iter_page(&sg_iter);
3222da9099ca42 Bob Pearson 2023-01-19  114  
3222da9099ca42 Bob Pearson 2023-01-19  115  			if (persistent && !is_pmem_page(page)) {
3222da9099ca42 Bob Pearson 2023-01-19  116  				rxe_dbg_mr(mr, "Page can't be persistent\n");
3222da9099ca42 Bob Pearson 2023-01-19  117  				return -EINVAL;
3222da9099ca42 Bob Pearson 2023-01-19  118  			}
3222da9099ca42 Bob Pearson 2023-01-19  119  
3222da9099ca42 Bob Pearson 2023-01-19  120  			xas_store(&xas, page);
3222da9099ca42 Bob Pearson 2023-01-19  121  			if (xas_error(&xas))
3222da9099ca42 Bob Pearson 2023-01-19  122  				break;
3222da9099ca42 Bob Pearson 2023-01-19  123  			xas_next(&xas);
3222da9099ca42 Bob Pearson 2023-01-19  124  			if (!__sg_page_iter_next(&sg_iter))
3222da9099ca42 Bob Pearson 2023-01-19  125  				break;
3222da9099ca42 Bob Pearson 2023-01-19  126  		}
3222da9099ca42 Bob Pearson 2023-01-19  127  		xas_unlock(&xas);
3222da9099ca42 Bob Pearson 2023-01-19  128  	} while (xas_nomem(&xas, GFP_KERNEL));
3222da9099ca42 Bob Pearson 2023-01-19  129  
3222da9099ca42 Bob Pearson 2023-01-19 @130  	return xas_error(&xas);
3222da9099ca42 Bob Pearson 2023-01-19  131  }
3222da9099ca42 Bob Pearson 2023-01-19  132  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-02-07  8:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 23:59 [PATCH for-next v7 0/6] RDMA/rxe: Replace mr page map with an xarray Bob Pearson
2023-01-19 23:59 ` [PATCH for-next v7 1/6] RDMA/rxe: Cleanup mr_check_range Bob Pearson
2023-01-19 23:59 ` [PATCH for-next v7 2/6] RDMA/rxe: Move rxe_map_mr_sg to rxe_mr.c Bob Pearson
2023-01-19 23:59 ` [PATCH for-next v7 3/6] RDMA-rxe: Isolate mr code from atomic_reply() Bob Pearson
2023-01-19 23:59 ` [PATCH for-next v7 4/6] RDMA-rxe: Isolate mr code from atomic_write_reply() Bob Pearson
2023-01-19 23:59 ` [PATCH for-next v7 5/6] RDMA/rxe: Cleanup page variables in rxe_mr.c Bob Pearson
2023-01-19 23:59 ` [PATCH for-next v7 6/6] RDMA/rxe: Replace rxe_map and rxe_phys_buf by xarray Bob Pearson
2023-01-27 16:23 ` [PATCH for-next v7 0/6] RDMA/rxe: Replace mr page map with an xarray Jason Gunthorpe
2023-01-27 17:05   ` Bob Pearson
2023-01-27 19:26   ` Bob Pearson
  -- strict thread matches above, loose matches on Subject: below --
2023-02-07  7:53 [PATCH for-next v7 6/6] RDMA/rxe: Replace rxe_map and rxe_phys_buf by xarray kernel test robot
2023-02-07  8:03 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.