On Thu, Jan 7, 2021 at 2:14 PM John Hubbard <jhubbard@xxxxxxxxxx> wrote: > > > > Literally just adding a " && page_mapcount(page) == 1" in there > > (probably best done inside page_maybe_dma_pinned() itself) > > Well, that means that pages that are used for pinned DMA like this, can > not be shared with other processes. Is that an acceptable limitation > for the RDMA users? It seems a bit constraining, at first glance anyway. Hmm, add a check for the page being PageAnon(), perhaps? If it's a shared vma, then the page can be pinned shared with multiple mappings, I agree. So yeah, I didn't think it through entirely.. And maybe I'm still missing something else.. Linus