libhsakmt: change memory allocation alignment
it is to optimize memory allocation latency, which changes alignment from 2MB to 1GB. Signed-off-by: Alex Sierra <alex.sierra@amd.com> Signed-off-by: Eric Huang <jinhuieric.huang@amd.com> Change-Id: I7818e9f13b17e2c0992e75b17f978dc03a018a57
This commit is contained in:
@@ -714,10 +714,10 @@ static void *mmap_aperture_allocate_aligned(manageable_aperture_t *aper,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Align big buffers to the next power-of-2 up to huge page
|
||||
* size for flexible fragment size TLB optimizations
|
||||
/* Align big buffers to the next power-of-2 up to 1GB
|
||||
* size for memory allocation optimization
|
||||
*/
|
||||
while (align < GPU_HUGE_PAGE_SIZE && size >= (align << 1))
|
||||
while (align < GPU_GIANT_PAGE_SIZE && size >= (align << 1))
|
||||
align <<= 1;
|
||||
|
||||
/* Add padding to guarantee proper alignment and leave guard
|
||||
|
||||
Reference in New Issue
Block a user