mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: fix chunk size mismatch in page allocator
When allocating discontiguous memory composed of several chunks, update also the number of pages used by the current chunk, if a large chunk was not available and a retry is performed with a smaller one. Failing to do this would result in too few chunks reserved for a large enough allocation in certain conditions. Bug 1805067 Change-Id: I9d14864724d228b42c47eb4669fbe0f789334397 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1214914 (cherry picked from commit 9bece931b13e4dad808622462d4d98d421cfb383) Reviewed-on: http://git-master/r/1220546 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
93d3199019
commit
6029684eb0
@@ -168,6 +168,8 @@ static struct gk20a_page_alloc *__gk20a_alloc_pages(
|
||||
}
|
||||
} while (!chunk_addr && chunk_len >= a->page_size);
|
||||
|
||||
chunk_pages = chunk_len >> a->page_shift;
|
||||
|
||||
if (!chunk_addr) {
|
||||
palloc_dbg(a, "bailing @ 0x%llx\n", chunk_len);
|
||||
goto fail_cleanup;
|
||||
|
||||
Reference in New Issue
Block a user