video: tegra: nvmap: Add hugetlbfs support

- For NvRmHeap_GpuMem, we are switching from a carveout to huge pages
obtained from hugetlbfs.
- Allocate a handle from VA using get_user_pages, when allocation is
requested from GPU heap.
- Introduce a new field to indicate that the pages are allocated from
hugetlbfs. This field will be useful while returning the correct heap
while querying the handle params for a handle which was created using
hugetlbfs.
- Update the query heap API for GpuMem heap to return the huge pages
memory values from meminfo.

Bug 4510173

Change-Id: I0dbef4c4e95969f8e3975a6dc58f10255db0635e
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3174720
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Ketan Patil
2024-07-14 07:11:51 +00:00
committed by mobile promotions
parent 9c92d38302
commit 8c52af9b59
4 changed files with 114 additions and 8 deletions

View File

@@ -94,6 +94,7 @@ struct nvmap_alloc_handle {
__u32 flags; /* wb/wc/uc/iwb etc. */
__u32 align; /* min alignment necessary */
__s32 numa_nid; /* NUMA node id */
__u64 va; /* virtual address to get huge pages from */
};
struct nvmap_alloc_ivm_handle {