Re: [PATCH net-next v2 4/5] page_pool: disable sync for cpu for dmabuf memory provider
From: Jason Gunthorpe
Date: Thu Nov 14 2024 - 20:59:29 EST
On Fri, Nov 08, 2024 at 11:01:21AM -0800, Mina Almasry wrote:
> > If you do this you may want to block accepting dmabufs that have CPU
> > pages inside them.
> >
>
> How do I check if the dmabuf has CPU pages inside of it? The only way
> I can think to do that is to sg_page a scatterlist entry, then
> !is_zone_device_page() the page. Or something like that, but I thought
> calling sg_page() on the dmabuf scatterlist was banned now.
I don't know. Many dmabuf scenarios abuse scatter list and the CPU
list is invalid, so you can't reference sg_page().
I think you'd need to discuss with the dmabuf maintainers.
Jason