On Fri, Nov 06, 2020 at 11:20:05AM -0700, Logan Gunthorpe wrote:
On 2020-11-06 11:09 a.m., Jason Gunthorpe wrote:
quoted
quoted
Ah, hmm, yes. I guess the pages have to be hooked and returned to the
genalloc through free_devmap_managed_page().
That sounds about right, but in this case it doesn't need the VMA
operations.
quoted
Seems like it might be doable... but it will complicate things for
users that don't want to use the genpool (though no such users exist
upstream).
I would like to use this stuff in RDMA pretty much immediately and the
genpool is harmful for those cases, so please don't make decisions
that are tying thing to genpool
I certainly can't make decisions for code that isn't currently
upstream.
The rdma drivers are all upstream, what are you thinking about?
Ultimately, if you aren't using the genpool you will have to implement
your own mmap operation that somehow allocates the pages and your own
page_free hook.
Sure, the mlx5 driver already has a specialized alloctor for it's BAR
pages.
I also don't expect this to be going upstream in the near term so don't
get too excited about using it.
I don't know, it is actually not that horrible, the GUP and IOMMU
related changes are simpler than I expected
Jason