linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IB_MR_TYPE_SG_GAPS support
@ 2021-08-26 17:26 Chuck Lever III
  2021-08-26 23:45 ` Jason Gunthorpe
  2021-08-27  6:27 ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Chuck Lever III @ 2021-08-26 17:26 UTC (permalink / raw)
  To: linux-rdma; +Cc: Kornievskaia, Olga

Hi-

I have a report that net/sunrpc/xprtrdma/frwr_ops.c::frwr_map()
is attempting to register a mix of GPU and CPU pages with a
single MR during an NFSv4 READ.

We think we understand where both pages are coming from, and
why frwr_map() is attempting to coalesce them (the verbs
provider happens to support IB_DEVICE_SG_GAPS_REG).

frwr_map() does this:

305         for (i = 0; i < nsegs;) {
306                 sg_set_page(&mr->mr_sg[i], seg->mr_page,
307                             seg->mr_len, seg->mr_offset);
308 
309                 ++seg;
310                 ++i;
311                 if (ep->re_mrtype == IB_MR_TYPE_SG_GAPS)
312                         continue;
313                 if ((i < nsegs && seg->mr_offset) ||
314                     offset_in_page((seg-1)->mr_offset + (seg-1)->mr_len))
315                         break;
316         }

If GPU and CPU pages are not considered contiguous, then some
additional loop termination logic is needed here so that at
a boundary between page types, xprtrdma will simply move
into a fresh MR instead of coalescing.

Does anyone have suggestions of where to look for an
appropriate check?

TIA

--
Chuck Lever




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

end of thread, other threads:[~2021-08-30  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 17:26 IB_MR_TYPE_SG_GAPS support Chuck Lever III
2021-08-26 23:45 ` Jason Gunthorpe
2021-08-27  6:27 ` Christoph Hellwig
2021-08-29 13:46   ` Max Gurtovoy
2021-08-30  8:29     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).