Re: [PATCH v3 26/30] drivers: hv: dxgkrnl: Offer and reclaim allocations

From: Wei Liu
Date: Wed Mar 02 2022 - 09:25:25 EST


On Tue, Mar 01, 2022 at 11:46:13AM -0800, Iouri Tarassov wrote:
> Implement ioctls to offer and reclaim compute device allocations:
> - LX_DXOFFERALLOCATIONS,
> - LX_DXRECLAIMALLOCATIONS2
>
> When a user mode driver (UMD) does not need to access an allocation,

What is a "user mode driver" in this context? Is that something that
runs inside the guest?

> it can "offer" it by issuing the LX_DXOFFERALLOCATIONS ioctl. This
> means that the allocation is not in use and its local device memory
> could be evicted. The freed space could be given to another allocation.
> When the allocation is again needed, the UMD can attempt to"reclaim"
> the allocation by issuing the LX_DXRECLAIMALLOCATIONS2 ioctl. If the
> allocation is still not evicted, the reclaim operation succeeds and no
> other action is required. If the reclaim operation fails, the caller
> must restore the content of the allocation before it can be used by
> the device.
>
> Signed-off-by: Iouri Tarassov <iourit@xxxxxxxxxxxxxxxxxxx>