summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/mm/page_allocator.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-08-22 20:41:24 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-24 01:57:29 -0400
commit8662fae334f2419da2e7fd220f7734217ec52433 (patch)
treeafaf33cebb75e129acd2bf9cc63273512a1e26e8 /drivers/gpu/nvgpu/common/mm/page_allocator.c
parent2ea017da0de62df05aef3158c62c67c8367f099e (diff)
gpu: nvgpu: Add mem usage to page allocator debug
Add the amount of memory used to the page allocator debug dump. Change-Id: Icd4b4a0489068aaa3f60221b792de7f8dbf0092c Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1543695 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm/page_allocator.c')
-rw-r--r--drivers/gpu/nvgpu/common/mm/page_allocator.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/page_allocator.c b/drivers/gpu/nvgpu/common/mm/page_allocator.c
index 3f4f3706..0eda13ec 100644
--- a/drivers/gpu/nvgpu/common/mm/page_allocator.c
+++ b/drivers/gpu/nvgpu/common/mm/page_allocator.c
@@ -777,6 +777,16 @@ static void nvgpu_page_print_stats(struct nvgpu_allocator *__a,
777 __alloc_pstat(s, __a, " pages freed %lld\n", a->pages_freed); 777 __alloc_pstat(s, __a, " pages freed %lld\n", a->pages_freed);
778 __alloc_pstat(s, __a, "\n"); 778 __alloc_pstat(s, __a, "\n");
779 779
780 __alloc_pstat(s, __a, "Page size: %lld KB\n",
781 a->page_size >> 10);
782 __alloc_pstat(s, __a, "Total pages: %lld (%lld MB)\n",
783 a->length / a->page_size,
784 a->length >> 20);
785 __alloc_pstat(s, __a, "Available pages: %lld (%lld MB)\n",
786 nvgpu_alloc_space(&a->source_allocator) / a->page_size,
787 nvgpu_alloc_space(&a->source_allocator) >> 20);
788 __alloc_pstat(s, __a, "\n");
789
780 /* 790 /*
781 * Slab info. 791 * Slab info.
782 */ 792 */