On Tue, Jun 16, 2026 at 01:57:49PM -0700, Bobby Eshleman wrote: > On Tue, Jun 16, 2026 at 06:04:03AM +0000, Kasireddy, Vivek wrote: > > Adding Jason to this discussion. > > > > Hi Bobby, > > > > > Subject: [PATCH net-next v2 2/4] udmabuf: emit one sg entry per pinned > > > folio > > > > > > From: Bobby Eshleman <[email protected]> > > > > > > get_sg_table() emitted one PAGE_SIZE sg entry per page even when the > > > underlying folio was larger. > > > > > > Instead, walk folios[] and emit one sg entry per folio. When folios > > We have recently merged a patch (that will make it into 7.2) from Jason that > > replaced sg_set_folio() with sg_alloc_table_from_pages() in udmabuf driver: > > https://gitlab.freedesktop.org/drm/tip/-/commit/5bf888673e0dda5a53220fa0c4956271a46c353c > > > > Since you are relying on sg_set_folio(), the core argument against its usage > > in udmabuf is that it doesn't work well with offsets > PAGE_SIZE, resulting > > in a malformed scatterlist. Not sure if this can be fixed easily. > > > > > represent large pages (as is for MFD_HUGETLB), each sg entry is a large > > > page. Normal PAGE_SIZE sg tables are unchanged. > > > > > > This is helpful for importers like net/core/devmem that expect dmabuf sg > > IMO, udmabuf needs to detect whether importers can handle segments that > > are > PAGE_SIZE and set the entries appropriately. Please look into how the > > GPU drivers and other dmabuf exporters/importers handle this situation, so > > that we can adopt best practices to address this issue. > > > > Thanks, > > Vivek > > Hey Vivek, > > It sounds looks like that patch might solve my problem. I'll apply and > troubleshoot from there. > > Thanks! > > Best, > Bobby
Good news for me, that patch solves the problem. Thanks for bringing that up! I can drop my udmabuf patch when I respin the series. Best, Bobby

