[PATCH 3/4] drm/amdgpu: add IOCTL interface for per VM BOs v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 30.08.2017 um 09:39 schrieb Michel Dänzer:
> On 30/08/17 04:34 PM, Christian König wrote:
>> Am 30.08.2017 um 08:46 schrieb Michel Dänzer:
>>> On 30/08/17 03:42 PM, Michel Dänzer wrote:
>>>> On 30/08/17 03:09 PM, Christian König wrote:
>>>>> Am 29.08.2017 um 19:20 schrieb Deucher, Alexander:
>>>>>>> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On
>>>>>>> Behalf
>>>>>>> Of Christian König
>>>>>>>
>>>>>>> @@ -89,6 +89,8 @@ extern "C" {
>>>>>>>     #define AMDGPU_GEM_CREATE_SHADOW        (1 << 4)
>>>>>>>     /* Flag that allocating the BO should use linear VRAM */
>>>>>>>     #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS    (1 << 5)
>>>>>>> +/* Flag that BO is local in the VM */
>>>>>>> +#define AMDGPU_GEM_CREATE_LOCAL            (1 << 6)
>>>>>> I'm not crazy about the name LOCAL.  Maybe something like
>>>>>> ALWAYS_VALID?
>>>>> Works for me as well. Dave any other opinion?
>>>>>
>>>>> If everybody is ok with ALWAYS_VALID I'm going to use that one.
>>>> FWIW, I like LOCAL better than ALWAYS_VALID. The latter suggests that
>>>> the BO is valid under any circumstances, whereas LOCAL indicates that it
>>>> cannot be used outside of the GPUVM it was created in.
>>>>
>>>> I don't feel strongly about it though, feel free to go with either.
>>> Another idea:
>>>
>>> /* The BO can only be used in the VM it was created in */
>>> #define AMDGPU_GEM_CREATE_UNSHAREABLE            (1 << 6)
>> That in turn doesn't note that it is always available.
>>
>> Additional to that I only limited sharing the BO because of the bad
>> performance and memory usage. In theory we could share them pretty well.
>>
>> How about VM_LOCAL ?
> Hmm, well if such BOs might become shareable in the future, ALWAYS_VALID
> might be best after all.

Well this would be misleading as well, cause when you share them with 
another process they need to be specified in the BO list again.

In other words in the process who created the BO it is always valid, but 
other processes need to specify it manually again.

This makes me think that we indeed should mention _VM_ in the name. 
Maybe _VM_ALWAYS_VALID?

Christian.



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux