diff options
author | Alex Waterman <alexw@nvidia.com> | 2015-03-18 16:33:09 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-05-11 11:53:25 -0400 |
commit | a2e852364582e9c337f52bc53ccc33877c8f3b47 (patch) | |
tree | fb13c5ad80db8eb2424a753a92389c7a3a322a12 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |
parent | 0566aee853eb32f4f796499b6b00ddf0f1d7de34 (diff) |
gpu: nvgpu: New allocator for VA space
Implement a new buddy allocation scheme for the GPU's VA space.
The bitmap allocator was using too much memory and is not a scaleable
solution as the GPU's address space keeps getting bigger. The buddy
allocation scheme is much more memory efficient when the majority
of the address space is not allocated.
The buddy allocator is not constrained by the notion of a split
address space. The bitmap allocator could only manage either small
pages or large pages but not both at the same time. Thus the bottom
of the address space was for small pages, the top for large pages.
Although, that split is not removed quite yet, the new allocator
enables that to happen.
The buddy allocator is also very scalable. It manages the relatively
small comptag space to the enormous GPU VA space and everything in
between. This is important since the GPU has lots of different sized
spaces that need managing.
Currently there are certain limitations. For one the allocator does
not handle the fixed allocations from CUDA very well. It can do so
but with certain caveats. The PTE page size is always set to small.
This means the BA may place other small page allocations in the
buddies around the fixed allocation. It does this to avoid having
large and small page allocations in the same PDE.
Change-Id: I501cd15af03611536490137331d43761c402c7f9
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/740694
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h index 6cd173e8..e54805a6 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * GK20A PMU (aka. gPMU outside gk20a context) | 4 | * GK20A PMU (aka. gPMU outside gk20a context) |
5 | * | 5 | * |
6 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms and conditions of the GNU General Public License, | 9 | * under the terms and conditions of the GNU General Public License, |
@@ -437,7 +437,7 @@ struct pmu_ucode_desc { | |||
437 | #define PMU_UNIT_ID_IS_VALID(id) \ | 437 | #define PMU_UNIT_ID_IS_VALID(id) \ |
438 | (((id) < PMU_UNIT_END) || ((id) >= PMU_UNIT_TEST_START)) | 438 | (((id) < PMU_UNIT_END) || ((id) >= PMU_UNIT_TEST_START)) |
439 | 439 | ||
440 | #define PMU_DMEM_ALLOC_ALIGNMENT (32) | 440 | #define PMU_DMEM_ALLOC_ALIGNMENT (4) |
441 | #define PMU_DMEM_ALIGNMENT (4) | 441 | #define PMU_DMEM_ALIGNMENT (4) |
442 | 442 | ||
443 | #define PMU_CMD_FLAGS_PMU_MASK (0xF0) | 443 | #define PMU_CMD_FLAGS_PMU_MASK (0xF0) |