[PATCH 1/2] drm/amdgpu: increase fragmentation size for Vega10 v2

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

 



Am 03.08.2017 um 23:01 schrieb Felix Kuehling:
> On 17-07-19 11:26 AM, Christian König wrote:
>> From: Christian König <christian.koenig at amd.com>
>>
>> The fragment bits work differently for Vega10 compared to previous generations.
>>
>> Increase the fragment size to 2MB for now to better handle that.
>>
>> v2: handle the hardware setup as well
>>
>> Signed-off-by: Christian König <christian.koenig at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c  | 5 +++--
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c   | 5 +++--
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h   | 4 +++-
>>   drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 4 +++-
>>   drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c  | 4 +++-
>>   5 files changed, 15 insertions(+), 7 deletions(-)
>>
>>
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> @@ -51,7 +51,9 @@ struct amdgpu_bo_list_entry;
>>   #define AMDGPU_VM_PTB_ALIGN_SIZE   32768
>>   
>>   /* LOG2 number of continuous pages for the fragment field */
>> -#define AMDGPU_LOG2_PAGES_PER_FRAG 4
>> +#define AMDGPU_LOG2_PAGES_PER_FRAG(adev) \
>> +	((adev)->asic_type < CHIP_VEGA10 ? 4 : \
>> +	 (adev)->vm_manager.block_size)
> With the hardware configuration changed for 256KB BigK TLBs, should this
> be changed to 256KB fragments on GFX9 now to get another small TLB boost
> for allocations smaller than 2MB?

As far as I understand it the answer is no. The fragment field on Vega10 
only affects the L1, not the L2 any more.

And we need to report 2MB as fragment size to userspace to get the BigK 
effect on the TLB.

Well what we could do is changing the fragment generation a bit make the 
L1 be used more efficient.

I've tried that for gfx8 once, but that unfortunately backfired because 
it affected the L2 as well, but for gfx9 that should now work fine.

Christian.

>
> Regards,
>    Felix
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx




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

  Powered by Linux