[PATCH v1 0/3] udmabuf: Add support for page migration out of movable zone or CMA
David Hildenbrand
david at redhat.com
Thu Aug 24 18:33:09 UTC 2023
On 24.08.23 20:30, Jason Gunthorpe wrote:
> On Thu, Aug 24, 2023 at 08:30:17PM +0200, David Hildenbrand wrote:
>> On 24.08.23 08:31, Kasireddy, Vivek wrote:
>>> Hi David,
>>>
>>>>
>>>>>> - Add a new API to the backing store/allocator to longterm-pin the page.
>>>>>> For example, something along the lines of
>>>> shmem_pin_mapping_page_longterm()
>>>>>> for shmem as suggested by Daniel. A similar one needs to be added for
>>>>>> hugetlbfs as well.
>>>>>
>>>>> This may also be reasonable.
>>>>
>>>> Sounds reasonable to keep the old API (that we unfortunately have) working.
>>> I agree; I'd like to avoid adding new APIs unless absolutely necessary. Given this,
>>> and considering the options I have mentioned earlier, what would be your
>>> recommendation for how page migration needs to be done in udmabuf driver?
>>
>> I guess using proper APIs for shmem and hugetlb. So, turning roughly what
>> you have in patch#1 for now into common code, and only calling into that
>> from udmabug.
>
> This is a lot of work for an obscure uapi :\
Well, what can we otherwise to to *not* break existing users? I'm not
happy about this either.
Of course, we can come up with a new uapi, but we have to handle the old
uapi somehow.
Sure, we can simply always fail when we detect ZONE_MOVABLE or
MIGRATE_CMA. Maybe that keeps at least some use cases working.
--
Cheers,
David / dhildenb
More information about the dri-devel
mailing list